Webanizr Logo
Open / sluit menu
Module myIndexedDB

Last change: September 13, 2019

Current version: 1.3.0

The myLocalStorage sets, gets and deletes items from and to the local storage of the browser.

webanizr.collect('myLocalStorage', parameters, callack);

webanizr.send('myLocalStorage', data, parameters, callack);

collect

parameters

The myLocalStorage module accepts the following parameters:

type__action (optional)

The type of action to perform. The following types are supported:

  • get: get data from the local storage
  • delete: delete data from the local storage
  • list: show all variables in a container in local storage
  • clear: clear all data from either the local storage or a container in the local storage

If no type is specified the type get is assumed.

name__var (required for the get and delete actions)

The variable to get or delete.

name__container (optional, required for the list action)

The name of the container to get data from, delete data from, list all variables from or to clear.

session__storage (optional)

If set to true, sessionStorage is used instead of localStorage.

callback

The function to send the data to.

send

parameters

The myLocalStorage module accepts the following parameters:

name__container (optional)

The name of the container to store the data in.

callback

The callback to call after the data is stored.

Changelog

  • September 20, 2019: 1.3.0 - added support for sessionStorage
  • September 13, 2019: 1.1.0 - added the container option and made it cross browser compatible
  • September 13, 2019: 1.0.0 - first version of the module