Last active
August 29, 2015 13:57
-
-
Save Noitidart/9384992 to your computer and use it in GitHub Desktop.
_ff-addon-snippet-contentWindowQIToDOMWin: How to get nsIDOMWindow from contentWindow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var DOMWin = win.QueryInterface(Ci.nsIInterfaceRequestor) | |
| .getInterface(Ci.nsIWebNavigation) | |
| .QueryInterface(Ci.nsIDocShellTreeItem) | |
| .rootTreeItem | |
| .QueryInterface(Ci.nsIInterfaceRequestor) | |
| .getInterface(Ci.nsIDOMWindow); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
README
Rev1
Rev2