extISessionStorage

This content covers features introduced in Thunderbird 3


extISessionStorage allows an extension to store data for the life time of the application (e.g. browser). extISessionStorage is defined in toolkit/components/exthelper/extIApplication.idl.

Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages.

Method overview

These methods are usually accessed via Application.storage.

Return Type Method
boolean has(in AString aName)
void set(in AString aName, in nsIVariant aValue)
nsIVariant get(in AString aName, in nsIVariant aDefaultValue)

Attributes

Attribute Type Description
events readonly attribute extIEvents The events object for the storage supports: "change"

Methods

has()

Determines if a storage item exists with the given name.

boolean has(in AString aName)
Parameters
aName
The name of an item
Return value

true if an item exists with the given name, false otherwise.

set()

Sets the value of a storage item with the given name.

void set(in AString aName, in nsIVariant aValue)
Parameters
aName
The name of an item
Return value

 

get()

Gets the value of a storage item with the given name. Returns a default value if the item does not exist.

nsIVariant get(in AString aName, in nsIVariant aDefaultValue)
Parameters
aName
The name of an item
Return value

value of the item or the given default value if no item exists with the given name.

See also

 FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey)

Document Tags and Contributors

 Contributors to this page: Sheppy, ziyunfei, jenzed, Docwhat, Potappo, Mgjbot, Gomita, MarkFinkle
 Last updated by: Sheppy,