[Project_owners] Reuse of window-watcher windows
Jesper Staun Hansen
jesper at heroes-addon.dk
Sun Sep 28 22:22:36 PDT 2008
Hello,
Considering this code http://pastebin.mozilla.org/544425 once I run
test.showbox(), then the window-watcher will keep existing even if the
window is closed. Question however is... How to I reuse the window
watcher to reopen the window?
I want to make what can be described as "persistent window when
possible". (that would be reuse the window if it hasn't been closed yet)
After the window is closed the stuff available that the window-watcher
is leaving behind is:
*Methods of prototype: *addEventListener, alert, atob, back, blur, btoa,
captureEvents, clearInterval, clearTimeout, close, confirm,
disableExternalCapture, dispatchEvent, dump, enableExternalCapture,
find, focus, forward, getAttention, getAttentionWithCycleCount,
getComputedStyle, getSelection, home, maximize, minimize, moveBy,
moveTo, open, openDialog, postMessage, print, prompt, releaseEvents,
removeEventListener, resizeBy, resizeTo, restore, routeEvent, scroll,
scrollBy, scrollByLines, scrollByPages, scrollTo, setCursor,
setInterval, setResizable, setTimeout, showModalDialog, sizeToContent,
stop, updateCommands
*Fields of prototype: *STATE_MAXIMIZED, STATE_MINIMIZED, STATE_NORMAL,
browserDOMWindow, closed, controllers, crypto, defaultStatus,
directories, document, frameElement, frames, fullScreen, globalStorage,
history, location, locationbar, menubar, name, opener, pageXOffset,
pageYOffset, parent, personalbar, pkcs11, screen, scrollMaxX,
scrollMaxY, scrollX, scrollY, scrollbars, self, sessionStorage, status,
statusbar, toolbar, top, window, windowState
*Unreachables of prototype: *applicationCache, content, innerHeight,
innerWidth, length, navigator, outerHeight, outerWidth, screenX,
screenY, title
None of these seems to allow the window to be reopened. (except
restore(), but that seems related to the general window restore).
Other info:
var watcher =
Components.classes["@mozilla.org/embedcomp/window-watcher;1"].getService(Components.interfaces.nsIWindowWatcher);
Stuffz available:
*Methods: *QueryInterface, getChromeForWindow, getNewAuthPrompter,
getNewPrompter, getWindowByName, getWindowEnumerator, openWindow,
registerNotification, setWindowCreator, unregisterNotification
*Fields: *activeWindow
Any ideas?
More information about the Project_owners
mailing list