0

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

0

1 Answer 1

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.

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

Not the answer you're looking for? Browse other questions tagged .