LocalStorage
From Web Computing Documentation
(Difference between revisions)
(→Public functions) |
(→Public functions) |
||
Line 9: | Line 9: | ||
This class provides interaction for the HaXe code with the browsers' [http://dev.w3.org/html5/webstorage/#the-localstorage-attribute localStorage] attribute accessible through JavaScript. |
This class provides interaction for the HaXe code with the browsers' [http://dev.w3.org/html5/webstorage/#the-localstorage-attribute localStorage] attribute accessible through JavaScript. |
||
+ | |||
+ | ==Public variables== |
||
+ | |||
+ | <div class="class_function_definition"> |
||
+ | '''length''' : Int |
||
+ | </div> |
||
+ | |||
+ | The number of key-value pairs in the localStorage. |
||
==Public functions== |
==Public functions== |
Latest revision as of 11:43, 17 August 2011
extern class LocalStorage
- web2grid
- web2grid.js
- web2grid.js.LocalStorage
- web2grid.js
[edit] Class overview
This class provides interaction for the HaXe code with the browsers' localStorage attribute accessible through JavaScript.
[edit] Public variables
length : Int
The number of key-value pairs in the localStorage.
[edit] 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
key
Returns the value corresponding to the key.
removeItem (key : String)
key
Removes the key-value pair specified by the key.
clear ()
Removes all entries from the localStorage.