E
E
Elvis2020-02-16 02:38:43
JavaScript
Elvis, 2020-02-16 02:38:43

How to access window from chrome extension?

Hey!
I am writing a plugin. I can see from the site code that it refers to window.top.minimap, but I don't have access to it from under the plugin.
For example, if I write in the plugin "console.log (window)" it produces not the same as in the console "console.log (window)". in the first case, it gives, as I understand it, the window of the plugin, and in the second, the window of the site. how do I get the window of the site and, accordingly, to all variables, in particular minimap?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-02-16
@Dr_Elvis

The extension code should embed the new script in the page. This script will have access to the page context but will lose access to the extension context

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question