There’s a bug (#20773) in chromium that causes content scripts to be unable to access frames. If you run the following snippet and the initial condition is true.
Then we get the output:
This was a bit of a bother since I was trying to find what the activeElement on a page was and that property sits on the document. So to be able to get the activeElement on pages with iframes I needed to do:
Instead I had to inject my script in all frames, which if you are using executeScript can be done like this:
So I changed the code to only check the current document and tell me when the bug is fixed: