[Optimoz] Check if only one browser window is open?
Jochen
autohide at krickelkrackel.de
Thu Jul 7 18:52:50 EDT 2005
Mark Lengowski wrote:
> How can I check to see if there is only one browser window open before
> attempting to close it?
Not tested, but it should work:
var myEnum = mgkWindowMediator.getEnumerator("navigator:browser")
myEnum.getNext() //goto 'current' browser window
if (!myEnum.hasMoreElements())
{
// your code
}
This code will only check for browser windows.
"mgkWindowMediator" is a global variable of MozGest.
More information about the Optimoz
mailing list