views:

15

answers:

1

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

+1  A: 

There are various ways, e.g.:

window in a script refers to the Firefox window.

Felix Kling
Thanks a millions!! I suspected like that and was trying to find the reference for the whole day..
Niraj Nawanit