Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIDOMStorage Interface Reference

import "nsIDOMStorage.idl";

Inheritance diagram for nsIDOMStorage:
Inheritance graph
[legend]
Collaboration diagram for nsIDOMStorage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

DOMString key (in unsigned long index)
 Retrieve the name of the key at a particular index.
nsIDOMStorageItem getItem (in DOMString key)
 Retrieve an item with a given key.
void setItem (in DOMString key, in DOMString data)
 Assign a value with a key.
void removeItem (in DOMString key)
 Remove a key and its corresponding value.

Public Attributes

readonly attribute unsigned long length
 The number of keys stored.

Detailed Description

Definition at line 57 of file nsIDOMStorage.idl.


Member Function Documentation

Retrieve an item with a given key.

Parameters:
keykey to retrieve
Returns:
found item or null if the key was not found
DOMString nsIDOMStorage::key ( in unsigned long  index)

Retrieve the name of the key at a particular index.

Parameters:
indexindex of the item to retrieve
Returns:
the key at index
Exceptions:
INDEX_SIZE_ERRif there is no key at that index
void nsIDOMStorage::removeItem ( in DOMString  key)

Remove a key and its corresponding value.

Parameters:
keykey to remove
void nsIDOMStorage::setItem ( in DOMString  key,
in DOMString  data 
)

Assign a value with a key.

If the key does not exist already, a new key is added associated with that value. If the key already exists, then the existing value is replaced with a new value.

Parameters:
keykey to set
datadata to associate with the key
Returns:
found item or null if the key was not found

Member Data Documentation

The number of keys stored.

Definition at line 62 of file nsIDOMStorage.idl.


The documentation for this interface was generated from the following file: