FUEL:SessionStorage
From MDC
This article covers features introduced in Firefox 3
Contents |
Application.storage allows an extension to store data for the life time of the application (e.g. browser).
[edit] 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)
|
[edit] Attributes
| Attribute | Type | Description |
events
| readonly attribute fuelIEvents
| The events object for the storage supports: "change" |
[edit] Methods
[edit] has()
Determines if a storage item exists with the given name.
boolean has(in AString aName)
[edit] Parameters
- aName
- The name of an item
[edit] Return value
true if an item exists with the given name, false otherwise.
[edit] set()
Sets the value of a storage item with the given name.
void set(in AString aName, in nsIVariant aValue)
[edit] Parameters
- aName
- The name of an item
[edit] Return value
[edit] 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)
[edit] Parameters
- aName
- The name of an item
[edit] Return value
value of the item or the given default value if no item exists with the given name.