Niraj Nawanit
Niraj Nawanit

Reputation: 2451

Not able to access firefox page from extension

I have created an add-on using firefox's add-on builder. I am able to create a javascript file inside add-on and can invoke a function when a user clicks on the button provided by addon.

The problem is I am not able to access firefox's webpage from that javascript file. When I access "document" object, it seems to be different object. And window.location is shown to be "chrome://browser/content/browser.xul"

Please suggest me how to make javascript access main page.

Thanks

Upvotes: 1

Views: 337

Answers (1)

Felix Kling
Felix Kling

Reputation: 817010

There are various ways, e.g.:

window in a script refers to the Firefox window.

Upvotes: 1

Related Questions