Command: getWindows() - bard/mozrepl GitHub Wiki
repl> var windows = repl.getWindows()
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.