nsISessionStore
| IID: | 11852a90-20de-11db-a98b-0800200c9a66 |
| Inherits From: | nsISupports |
nsISessionStore keeps track of the current browsing state - i.e. tab history, cookies, scroll state, form data, POSTDATA and window features - and allows to restore everything into one window.
This interface is implemented by the following components:
Methods
void deleteTabValue ( nsIDOMNode tab , AString key )
void deleteWindowValue ( nsIDOMWindow window , AString key )
AString getBrowserState ( )
PRUint32 getClosedTabCount ( nsIDOMWindow window )
AString getClosedTabData ( nsIDOMWindow window )
AString getTabValue ( nsIDOMNode tab , AString key )
AString getWindowState ( nsIDOMWindow window )
AString getWindowValue ( nsIDOMWindow window , AString key )
void init ( nsIDOMWindow window )
void persistTabAttribute ( AString name )
void setBrowserState ( AString state )
void setTabValue ( nsIDOMNode tab , AString key , AString stringValue )
void setWindowState ( nsIDOMWindow window , AString state , PRBool overwrite )
void setWindowValue ( nsIDOMWindow window , AString key , AString stringValue )
void undoCloseTab ( nsIDOMWindow window , PRUint32 index )
void deleteTabValue ( nsIDOMNode tab , AString key )
- Arguments:
- tab: is the tab to get the value for.
- key: is the value's name.
void deleteWindowValue ( nsIDOMWindow window , AString key )
- Arguments:
- window: is the window to get the value for.
- key: is the value's name.
Get the current browsing state.
- Returns:
- a JSON string representing the session state.
PRUint32 getClosedTabCount ( nsIDOMWindow window )
Get the number of restore-able tabs for a window
- Arguments:
- window
AString getClosedTabData ( nsIDOMWindow window )
Get closed tab data
- Arguments:
- window
- Returns:
- a JSON string representing the list of closed tabs.
AString getTabValue ( nsIDOMNode tab , AString key )
- Arguments:
- tab: is the tab to get the value for.
- key: is the value's name.
- Returns:
- A string value or "" if none is set.
AString getWindowState ( nsIDOMWindow window )
- Arguments:
- window: is the window whose state is to be returned.
- Returns:
- a JSON string representing a session state with only one window.
AString getWindowValue ( nsIDOMWindow window , AString key )
- Arguments:
- window: is the window to get the value for.
- key: is the value's name.
- Returns:
- A string value or "" if none is set.
void persistTabAttribute ( AString name )
- Arguments:
- name: is the name of the attribute to save/restore for all xul:tabs.
void setBrowserState ( AString state )
Set the browsing state. This will immediately restore the state of the whole application to the state passed in, *replacing* the current session.
- Arguments:
- state: is a JSON string representing the session state.
void setTabValue ( nsIDOMNode tab , AString key , AString stringValue )
- Arguments:
- tab: is the tab to set the value for.
- key: is the value's name.
- stringValue: is the value itself (use toSource/eval before setting JS objects).
void setWindowState ( nsIDOMWindow window , AString state , PRBool overwrite )
- Arguments:
- window: is the window whose state is to be set.
- state: is a JSON string representing a session state.
- overwrite: boolean overwrite existing tabs
void setWindowValue ( nsIDOMWindow window , AString key , AString stringValue )
- Arguments:
- window: is the window to set the value for.
- key: is the value's name.
- stringValue: is the value itself (use toSource/eval before setting JS objects).
void undoCloseTab ( nsIDOMWindow window , PRUint32 index )
- Arguments:
- window: The window to reopen a closed tab in.
- index: Indicates the window to be restored (FIFO ordered).
Reference documentation is generated from Mozilla's source.
