Reputation:
I wish to access elements in a site with javascript and I have been using javascript for quite some time, especially with the querySelector
functions. But for some reason, it won't work in this case; whenever I try to access any of the top-level elements, as illustrated below, no elements are found.
Does anyone have an idea about what the problem could be, and maybe even how to fix it?
Upvotes: 1
Views: 62
Reputation: 808
That's normal, It's because when you use the chrome developer console you can change the document context and in your screen you are inside the iframe.
You can see it here:
Upvotes: 1