import"nsISessionStore.idl";
Public Member Functions | |
void | init (in nsIDOMWindow aWindow) |
AString | getBrowserState () |
void | setBrowserState (in AString aState) |
AString | getWindowState (in nsIDOMWindow aWindow) |
void | setWindowState (in nsIDOMWindow aWindow, in AString aState, in boolean aOverwrite) |
AString | getTabState (in nsIDOMNode aTab) |
void | setTabState (in nsIDOMNode aTab, in AString aState) |
nsIDOMNode | duplicateTab (in nsIDOMWindow aWindow, in nsIDOMNode aTab) |
unsigned long | getClosedTabCount (in nsIDOMWindow aWindow) |
AString | getClosedTabData (in nsIDOMWindow aWindow) |
nsIDOMNode | undoCloseTab (in nsIDOMWindow aWindow, in unsigned long aIndex) |
nsIDOMNode | forgetClosedTab (in nsIDOMWindow aWindow, in unsigned long aIndex) |
unsigned long | getClosedWindowCount () |
AString | getClosedWindowData () |
nsIDOMWindow | undoCloseWindow (in unsigned long aIndex) |
nsIDOMNode | forgetClosedWindow (in unsigned long aIndex) |
AString | getWindowValue (in nsIDOMWindow aWindow, in AString aKey) |
void | setWindowValue (in nsIDOMWindow aWindow, in AString aKey, in AString aStringValue) |
void | deleteWindowValue (in nsIDOMWindow aWindow, in AString aKey) |
AString | getTabValue (in nsIDOMNode aTab, in AString aKey) |
void | setTabValue (in nsIDOMNode aTab, in AString aKey, in AString aStringValue) |
void | deleteTabValue (in nsIDOMNode aTab, in AString aKey) |
void | persistTabAttribute (in AString aName) |
nsISessionStore keeps track of the current browsing state - i.e. tab history, cookies, scroll state, form data, POSTDATA and window features
The nsISessionStore API operates mostly on browser windows and the tabbrowser tabs contained in them:
Definition at line 63 of file nsISessionStore.idl.
void nsISessionStore::deleteTabValue | ( | in nsIDOMNode | aTab, |
in AString | aKey | ||
) |
aTab | is the tabbrowser tab to get the value for. |
aKey | is the value's name. |
void nsISessionStore::deleteWindowValue | ( | in nsIDOMWindow | aWindow, |
in AString | aKey | ||
) |
aWindow | is the browser window to get the value for. |
aKey | is the value's name. |
nsIDOMNode nsISessionStore::duplicateTab | ( | in nsIDOMWindow | aWindow, |
in nsIDOMNode | aTab | ||
) |
Duplicates a given tab as thoroughly as possible.
aWindow | is the browser window into which the tab will be duplicated. |
aTab | is the tabbrowser tab to duplicate (can be from a different window). |
nsIDOMNode nsISessionStore::forgetClosedTab | ( | in nsIDOMWindow | aWindow, |
in unsigned long | aIndex | ||
) |
aWindow | is the browser window associated with the closed tab. |
aIndex | is the index of the closed tab to be removed (FIFO ordered). |
nsIDOMNode nsISessionStore::forgetClosedWindow | ( | in unsigned long | aIndex | ) |
aIndex | is the index of the closed window to be removed (FIFO ordered). |
NS_ERROR_INVALID_ARG | when aIndex does not map to a closed window |
AString nsISessionStore::getBrowserState | ( | ) |
Get the current browsing state.
unsigned long nsISessionStore::getClosedTabCount | ( | in nsIDOMWindow | aWindow | ) |
Get the number of restore-able tabs for a browser window
AString nsISessionStore::getClosedTabData | ( | in nsIDOMWindow | aWindow | ) |
Get closed tab data
aWindow | is the browser window for which to get closed tab data |
unsigned long nsISessionStore::getClosedWindowCount | ( | ) |
Get the number of restore-able windows
AString nsISessionStore::getClosedWindowData | ( | ) |
Get closed windows data
AString nsISessionStore::getTabState | ( | in nsIDOMNode | aTab | ) |
aTab | is the tabbrowser tab whose state is to be returned. |
AString nsISessionStore::getTabValue | ( | in nsIDOMNode | aTab, |
in AString | aKey | ||
) |
aTab | is the tabbrowser tab to get the value for. |
aKey | is the value's name. |
AString nsISessionStore::getWindowState | ( | in nsIDOMWindow | aWindow | ) |
aWindow | is the browser window whose state is to be returned. |
AString nsISessionStore::getWindowValue | ( | in nsIDOMWindow | aWindow, |
in AString | aKey | ||
) |
aWindow | is the window to get the value for. |
aKey | is the value's name. |
void nsISessionStore::init | ( | in nsIDOMWindow | aWindow | ) |
Initialize the service
void nsISessionStore::persistTabAttribute | ( | in AString | aName | ) |
aName | is the name of the attribute to save/restore for all tabbrowser tabs. |
void nsISessionStore::setBrowserState | ( | in AString | aState | ) |
Set the browsing state. This will immediately restore the state of the whole application to the state passed in, replacing the current session.
aState | is a JSON string representing the session state. |
void nsISessionStore::setTabState | ( | in nsIDOMNode | aTab, |
in AString | aState | ||
) |
aTab | is the tabbrowser tab whose state is to be set. |
aState | is a JSON string representing a session state. |
void nsISessionStore::setTabValue | ( | in nsIDOMNode | aTab, |
in AString | aKey, | ||
in AString | aStringValue | ||
) |
aTab | is the tabbrowser tab to set the value for. |
aKey | is the value's name. |
aStringValue | is the value itself (use toSource/eval before setting JS objects). |
void nsISessionStore::setWindowState | ( | in nsIDOMWindow | aWindow, |
in AString | aState, | ||
in boolean | aOverwrite | ||
) |
aWindow | is the browser window whose state is to be set. |
aState | is a JSON string representing a session state. |
aOverwrite | boolean overwrite existing tabs |
void nsISessionStore::setWindowValue | ( | in nsIDOMWindow | aWindow, |
in AString | aKey, | ||
in AString | aStringValue | ||
) |
aWindow | is the browser window to set the value for. |
aKey | is the value's name. |
aStringValue | is the value itself (use toSource/eval before setting JS objects). |
nsIDOMNode nsISessionStore::undoCloseTab | ( | in nsIDOMWindow | aWindow, |
in unsigned long | aIndex | ||
) |
aWindow | is the browser window to reopen a closed tab in. |
aIndex | is the index of the tab to be restored (FIFO ordered). |
nsIDOMWindow nsISessionStore::undoCloseWindow | ( | in unsigned long | aIndex | ) |
aIndex | is the index of the windows to be restored (FIFO ordered). |