N
N
Nentra2021-12-22 11:23:07
JavaScript
Nentra, 2021-12-22 11:23:07

Schrödinger object - why is there no object, if there is visual data, how to get this data in the end?

I'm trying to get the value of an element, but I get an error when I switch to the elements tab and click on this element with the mouse, and then switch back to the console and try to get the text content of this element again, then everything works.

Why is this happening?
How can I immediately get the text content of an element without switching to the elements tab and then back again?

*Bitrix API JS does not allow you to get the content of the fields from the lead you are creating.

Screenshots
61c2dfdf2563e209129098.png
61c2dfe842c4f856107690.png
61c2dff0ec95d261691166.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-12-22
@Nentra

document.querySelector('iframe.side-panel-iframe').contentWindow.document.querySelector('.your-selector')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question