Reputation: 403
Is it possible to trigger user defined function from within Firefox?
I've tried this, with no luck:
var window=window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIWebNavigation).
QueryInterface(Components.interfaces.nsIDocShellTreeItem).
rootTreeItem.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindow).
getBrowser().
selectedBrowser.
contentWindow;
// user function defined in frame
window.frames[1].someFunction(arg)
Upvotes: 0
Views: 72
Reputation: 35054
You want window.frames[1].wrappedJSObject.someFunction(arg)
, presumably.
Upvotes: 1