canvas - Can I access a firefox plugin element from an in-page javascript? -


I have created a canvas object in my Firefox plugin and now, I want to access it from a webpage (webpage only Will work when the plugin is installed and the browser is FF).

Now, generally we access the DOM elements within a page via the browser plugin. How can I get it in another way - that is, inside the web page, use the canvas element inside the plug from JS?

Thank you Kapil

post-text "itemprop =" text ">

There is no way to javascript in the web page to interact with the defined elements in the Firefox extension.

Elements defined within the Firefox extension are part of the browser user interface (Chrome). Since web pages run JavaScript with restricted privileges they can not do many things, and among them, Can not directly reference or interact with.

The JavaScript code running in the extension can access the elements defined in the web pages because it has high privileges, so if you both want to communicate, then this Extension code must be started by.

And while doing so, you have to be careful or your extension can open a big security hole that is malicious The website is set to execute javascript with Chrome privileges.

The following links can give you more information on this:


Comments