I\'m creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not insid
I have a very simpler way to do it. Suppose you have to call xyz() function which is written on page. and you have to call it from your pluggin.
create a button ("make it invisible. so it wont disturb your page"). on onclick of that button call this xyz() function.
now in pluggin you have a document object for the page. suppose its mainDoc
where you want to call xyz(), just execute this line
mainDoc.getElementById('testbutton').click();
it will call the xyz() function.
good luck :)