From Web Computing Documentation
Jump to: navigation, search

extern class LocalStorage

  • web2grid
    • web2grid.js
      • web2grid.js.LocalStorage

Class overview

This class provides interaction for the HaXe code with the browsers' localStorage attribute accessible through JavaScript.

Public variables

length : Int

The number of key-value pairs in the localStorage.

Public functions

key (index : Int) : String

index The number n the requested index.

Returns the name of the nth index from the localStorage.

setItem (key : String, value : Dynamic)

key value

Sets the given key-value pair in the localStorage.

getItem (key : String) : Dynamic


Returns the value corresponding to the key.

removeItem (key : String)


Removes the key-value pair specified by the key.

clear ()

Removes all entries from the localStorage.

Personal tools