Results 101 - 120 of 161

Storage.length

The length read-only property of the Storage interface returns an integer representing the number of data items stored in the Storage object.
API Property Read-only Reference Référence Storage Web Storage

Window.localStorage

The localStorage property allows you to access a local Storage object. localStorage is similar to sessionStorage. The only difference is that, while data stored in localStorage has no expiration time, data stored in sessionStorage gets cleared when the browsing session ends—that is, when the browser is closed.
API localStorage Property Reference Référence Storage Web Storage WindowLocalStorage

Window.sessionStorage

The sessionStorage property allows you to access a session Storage object. sessionStorage is similar to Window.localStorage, the only difference is while data stored in localStorage has no expiration set, data stored in sessionStorage gets cleared when the page session ends. A page session lasts for as long as the browser is open and survives over page reloads and restores. Opening a page in a new tab or window will cause a new session to be initiated, which differs from how session cookies work.
API Property Reference Référence sessionStorage storage Storage WindowSessionStorage

LocalStorage

localStorage is the same as sessionStorage with the same same-origin rules applied but it is persistent. localStorage was introduced in Firefox 3.5.
API Offline Reference Référence Storage API

StorageEvent

A StorageEvent is sent to a window when a storage area changes.
API Reference Référence Web Storage API

WindowEventHandlers.onstorage

The WindowEventHandlers.onstorage property contains an event handler that runs when the storage event fires. This occurs when a storage area is changed (e.g. a new item is stored.)
API Property Reference Web Storage WindowEventHandlers

Using the Data Store API

To explain the main functionality of Data Store, we have build two examples that work together (you can download these from Github using the code below, and experiment with them as you wish):
B2G Data Store API Database Firefox OS Guide Storage storage

DataStore

The DataStore interface of the Data Store API represents a retrieved set of data, and includes standard properties for accessing the store's name, owner, etc., methods for reading, modifying and syncing data, and the onchange event handler for reacting to changes to the data.
API Data Store API Database DataStore Interface Non-standard Reference Référence storage Storage

DataStoreChangeEvent

The DataStoreChangeEvent interface of the Data Store API represents the event related to a record changed in the data store, i.e. this is returned once a change is made and the change event is fired (see DataStore.onchange for the handler).
API Data Store Data Store API Database DataStoreChangeEvent Interface Non-standard Reference Référence Storage storage

DataStoreChangeEvent.id

The id read-only property of the DataStoreChangeEvent interface returns the identifier of the changed record in the data store. This must return null if the operation is cleared.
API Data Store Data Store API Database DataStoreChangeEvent id Property Reference Référence storage Storage

DataStoreChangeEvent.operation

The operation read-only property of the DataStoreChangeEvent interface returns the type of operation that represents the current change that has been made to the data store.
API Data Store Data Store API Database DataStoreChangeEvent operation Property Reference Référence Storage storage

DataStoreChangeEvent.owner

The owner read-only property of the DataStoreChangeEvent interface returns the manifest URL of the application that made the change to the data store.
API Data Store Data Store API Database DataStoreChangeEvent owner Property Reference Référence Storage storage

DataStoreChangeEvent.revisionId

The revisionId read-only property of the DataStoreChangeEvent interface returns the ID of the current revision of the data store, i.e. the current change that has been made to a data record.
API Data Store Data Store API Database DataStoreChangeEvent Property Reference revisionId Référence Storage storage

DataStoreCursor

The DataStoreCursor interface of the Data Store API represents a cursor that allows apps to iterate through a list of DataStoreTask objects representing the change history of the data store, for use when synchronizing the data.
API Data Store Data Store API Database DataStoreCursor Interface Non-standard Reference Référence Storage storage

DataStoreCursor.close()

The close() method of the DataStoreCursor interface makes a request to terminate the cursor.
API close Data Store Data Store API Database DataStoreCursor Method Reference Référence Storage storage

DataStoreCursor.next()

The next() method of the DataStoreCursor interface makes a request to retrieve information about the next operation that changes a record in the data store. Returns a promise of type DataStoreTask.
API Data Store Data Store API Database DataStoreCursor Method Next next Reference Référence storage Storage

DataStoreTask

The DataStoreTask interface of the Data Store API represents a record changed in the data store when a DataStoreCursor is used to iterate through the data store's change history.
API Data Store Data Store API Database DataStoreTask Interface Non-standard Reference Référence storage Storage

DataStoreTask.data

The data read-only property of the DataStoreChangeEvent interface returns the data stored in the changed record in the data store. Must return null if the operation is clear or done.
API data Data Store Data Store API Database DataStoreTask Property Reference Référence storage Storage