You need to sign in to do that
Don't have an account?
Leonardi Koh
Accessing Proxy Handler target in javascript
As the title suggested, I am attempting to access the Proxy Handler target content in javascript running on an Aura component , so I had a line similar to
in my Aura component, and when rendered predictably enough this shows a Proxy object with Handler, etc... typical of what one expect.
(the result looks like this:)
so I can see it right there in the console, and in the example above i can see the innerText, outerText value etc...
So the question is what is the correct way to read these values in javascript?
For example, if i want to read the value of this Proxy -> Handler -> target -> 0 (1st element of this HTMLCollection) -> innerText
then what is the correct way to do it in javascript?
var theElements = document.getElementsByClassName('slds-text-heading_small'); console.log(theElements);
in my Aura component, and when rendered predictably enough this shows a Proxy object with Handler, etc... typical of what one expect.
(the result looks like this:)
so I can see it right there in the console, and in the example above i can see the innerText, outerText value etc...
So the question is what is the correct way to read these values in javascript?
For example, if i want to read the value of this Proxy -> Handler -> target -> 0 (1st element of this HTMLCollection) -> innerText
then what is the correct way to do it in javascript?