lykm
lykm

Reputation: 15

javascript to open a firefox extension

I try to open a new tab of Firefox extension (URL starts like chrome://xxx/content) in a web page.

I have tried window.open().location='chrome://xxx/content';, but I always got a new tab like http://chrome://xxx/content.

So the question is whether there is a solution to open the Firefox extension in web-page JavaScript.

If the answer is yes, how to realize it?

Upvotes: 0

Views: 157

Answers (1)

Wladimir Palant
Wladimir Palant

Reputation: 57651

The answer is "no". A web page is not allowed to open browser/extension user interface elements, for security reasons.

Now the web page could notify the extension that a particular extension page needs opening: https://developer.mozilla.org/en/Code_snippets/Interaction_between_privileged_and_non-privileged_pages. But given that your question doesn't provide any details on what you are trying to achieve it isn't clear whether this is a viable approach for you.

Upvotes: 1

Related Questions