Search completed in 1.13 seconds.
8 results for "windowstate":
nsISessionStore
Mozilla › Tech › XPCOM › Reference › Interface › nsISessionStore
aIndex); AString getBrowserState(); unsigned long getClosedTabCount(in nsIDOMWindow aWindow); AString getClosedTabData(in nsIDOMWindow aWindow); unsigned long getClosedWindowCount(); AString getClosedWindowData(); AString getTabState(in nsIDOMNode aTab); AString getTabValue(in nsIDOMNode aTab, in AString aKey); AString getWindowState(in nsIDOMWindow aWindow); AString getWindowValue(in nsIDOMWindow aWindow, in AString aKey); void init(in nsIDOMWindow aWindow); void persistTabAttribute(in AString aName); void restoreLastSession(); void setBrowserState(in AString aState); void setTabState(in nsIDOMNode aTab, in AString aState); void setTabValue(in nsIDOMNode aTab, ...
...n nsIDOMWindow aWindow, in AString aKey); void init(in nsIDOMWindow aWindow); void persistTabAttribute(in AString aName); void restoreLastSession(); void setBrowserState(in AString aState); void setTabState(in nsIDOMNode aTab, in AString aState); void setTabValue(in nsIDOMNode aTab, in AString aKey, in AString aStringValue); void setWindowState(in nsIDOMWindow aWindow, in AString aState, in boolean aOverwrite); void setWindowValue(in nsIDOMWindow aWindow, in AString aKey, in AString aStringValue); nsIDOMNode undoCloseTab(in nsIDOMWindow aWindow, in unsigned long aIndex); nsIDOMWindow undoCloseWindow(in unsigned long aIndex); Attributes Attribute Type Description canRestoreLastS...
...m in the list is the last window that was closed. getTabState() Returns the state of the specified tab. AString getTabState( in nsIDOMNode aTab ); Parameters aTab The tab whose state is to be returned. Return value A JSON string representing the state of the specified tab. Note: The returned string does not include cookies. If you need to retrieve cookies as well, you should use getWindowState() instead. getTabValue() Returns the value corresponding to a key on a given window. AString getTabValue( in nsIDOMNode aTab, in AString aKey ); Parameters aTab The tab on which to get the value. aKey The key whose corresponding value is to be returned. Return value The string value that was previously assigned to aKey using nsISessionStore.setTabValue(), or an empty string if n...
...And 2 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
Archive › Add-ons › Overlay Extensions › Firefox addons developer guide › Let's build a Firefox extension
ows the event handler for the dynamically generated menu items, which were created using the createMenu method (which we'll get to shortly). Lines 3-6 get the file name from the special attribute fileName that was added by the createMenu method, and read in the JSON text string from that file using the _readFile method (which we'll get to shortly). Lines 7-9 use the nslSessionStore interface's setWindowState method to restore the session, using the current window as an origin point. Session restoration overwrites any currently open tabs. Listing 20: Content for restore method restore: function(event) { var fileName = event.target.getAttribute("fileName"); var file = this._dir.clone(); file.append(fileName); var state = this._readFile(file); var ss = Components.classes["@mozilla.org/browse...
...ration overwrites any currently open tabs. Listing 20: Content for restore method restore: function(event) { var fileName = event.target.getAttribute("fileName"); var file = this._dir.clone(); file.append(fileName); var state = this._readFile(file); var ss = Components.classes["@mozilla.org/browser/sessionstore;1"] .getService(Components.interfaces.nsISessionStore); ss.setWindowState(window, state, false); }, clear method This uses the directoryEntries property of the nslFile interface to delete all files within the directory you got earlier. Refer to the section "Traversing folders" in Chapter 4. Listing 21: Content for clear method clear: function(event) { event.preventBubble(); var fileEnum = this._dir.directoryEntries; while (fileEnum.hasMoreElements())...
...two methods in the nslSessionStore interface in this project. Let's look at how they work. getBrowserState() Returns a JSON-formatted5 text string representing the state of every currently open browser window. This string includes extensive information regarding every open window and tab, the forward/back history for each tab, page scroll position, text zoom, contents of form elements, etc. setWindowState(aWindow, aState, aOverwrite) Restores the browser window indicated by the parameter aWindow to the state indicated by aState. If aOverwrite is true, the currently open tab is overwritten; otherwise, a new tab is created for the restored content. JavaScript debugging methods alert The easiest way to debug javascvript is using the window.alert method to display variables in a dialog (Listing ...
nsISHEntry
Mozilla › Tech › XPCOM › Reference › Interface › nsISHEntry
y Saved refresh URI list for the content viewer. saveLayoutStateFlag boolean Indicate whether layoutHistoryState should be saved. stateData nsIStructuredCloneContainer Get/set data associated with this history state via a pushState() call, serialized using structured clone. (Prior to Gecko 6.0 returned a JSON encoded string.) sticky boolean Whether the content viewer is marked "sticky" windowState nsISupports Saved state of the global window object. Methods addChildShell() Saved child docshells corresponding to contentViewer. The child shells are restored as children of the parent docshell, in this order, when the parent docshell restores a saved presentation. Append a child shell to the end of our list. void addChildShell( in nsIDocShellTreeItem shell ); Parameters shell childSh...
...ich is unique among those of all other entries. void setUniqueDocIdentifier(); Parameters None. setURI() URI for the document. void setURI( in nsIURI aURI ); Parameters aURI Native code only!setViewerBounds void setViewerBounds( in nsIntRect bounds ); Parameters bounds syncPresentationState() Ensure that the cached presentation members are self-consistent. If either contentViewer or windowState are null, then all of the following members are cleared/reset: contentViewer, sticky, windowState, viewerBounds, childShells, refreshURIList. void syncPresentationState(); Parameters None. Example see nsSessionStore.js for a real example. ...
sizemode - Archive of obsolete content
Archive › Mozilla › XUL › Attribute › sizemode
s). Note: When a window is minimized, the sizemode attribute is not updated. This is done so that if a window is closed while minimized, its persisted sizemode attribute wouldn't be minimized. Setting this attribute does not change the window state. Use window.maximize(), window.restore(), or window.minimize() to change the window state. To get the window state from JavaScript code, use window.windowState. Listen to the sizemodechange event dispatched to the DOM window to get notified when the window state changes. Note: Prior to Gecko 13.0, this did not work on Mac OS X. Note: Prior to Gecko 1.9.2, this was not always reliable. Issues with this attribute (at least on Firefox 3): sizemode is only updated when the value of the persist attribute on the root element (such as <window>) c...
XUL Events - Archive of obsolete content
Archive › Mozilla › XUL › Events
Sent when a window becomes inactive. sizemodechange Sent when a window is minimized or un-minimized, switched between full screen and windowed mode, or maximized. Note: This event may fire several times or while resizing the window (for example, see bug 715867), so always check if the window state changed by inspecting window.windowState in the event. Accessibility events These events are used to notify the accessibility system of changes to an element. You would not normally use these yourself. Event Description CheckboxStateChange This event is sent when a checkbo...
window - Archive of obsolete content
Archive › Mozilla › XUL › window
s). Note: When a window is minimized, the sizemode attribute is not updated. This is done so that if a window is closed while minimized, its persisted sizemode attribute wouldn't be minimized. Setting this attribute does not change the window state. Use window.maximize(), window.restore(), or window.minimize() to change the window state. To get the window state from JavaScript code, use window.windowState. Listen to the sizemodechange event dispatched to the DOM window to get notified when the window state changes. title Type: string The text to appear in the title bar of the window. width Type: string (representing an integer) The preferred width of the element. The value should not include a unit as all values are in pixels. The actual displayed width may be different if the ele...
nsIDOMChromeWindow
Mozilla › Tech › XPCOM › Reference › Interface › nsIDOMChromeWindow
sor(in DOMString cursor); Attributes Attribute Type Description browserDOMWindow nsIBrowserDOMWindow The related nsIBrowserDOMWindow instance which provides access to yet another layer of utility functions by chrome script. It will be null for DOMWindows not corresponding to browsers. messageManager nsIChromeFrameMessageManager Read only. title DOMString Obsolete since Gecko 1.9.1 windowState unsigned short Returns current window state, the value is one of STATE_* constants. Read only. Constants Constant Value Description STATE_MAXIMIZED 1 The window is maximized. STATE_MINIMIZED 2 The window is minimized. STATE_NORMAL 3 The window is normal. STATE_FULLSCREEN 4 The window is in full screen mode. Methods beginWindowMove() On some operating systems, we must allow the w...
Event reference
Web › Events
DOM fullscreen mode has been entered. SSWindowClosing Addons specific The session store will stop tracking this window. SSTabClosing Addons specific The session store will stop tracking this tab. SSTabRestoring Addons specific A tab is about to be restored. SSTabRestored Addons specific A tab has been restored. SSWindowStateReady Addons specific A window state has switched to "ready". SSWindowStateBusy Addons specific A window state has switched to "busy". TabOpen Addons specific A tab has been opened. TabClose Addons specific A tab has been closed. TabSelect Addons specific A tab has been selected. TabShow Addons sp...