You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.
regularfry edited this page Sep 13, 2010
·
4 revisions
Usage
repl> var windows = repl.getWindows()
Code
function getWindows() {
var windowEnum = Cc['@mozilla.org/appshell/window-mediator;1']
.getService(Ci.nsIWindowMediator).getEnumerator('');
var windows = [];
while(windowEnum.hasMoreElements())
windows.push(windowEnum.getNext());
return windows;
}
This function will cause the REPL to throw an error if you try to pass the resulting array back directly, but getWindows()[i] and getWindows().length work fine.