0

This question already has an answer here:

How can I access the html element div.card as shown below, the div returns as Proxy{} in lightning and I cannot manipulate the DOM. The div comes from the content in controller because it is in rich text format, so I had to use lighting formattedText. Is there a way to access it in lightning? Thank you.

enter image description here

marked as duplicate by Mark Pond, battery.cord, Pranay Jaiswal, glls, crmprogdev Mar 10 at 15:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Typically, you use:

for(var i = 0; i < divList.length; i++) {
  // do something here
}

Because HTMLCollection is not a list, you can't use the more familiar for(var x in y) syntax.

  • hi sfdcfox, I've tried that it doesn't work either. – John Wick Mar 12 at 2:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.