W3cubDocs

/Haxe JavaScript

Storage

package js.html

@:native("Storage") Available on js

The Storage interface of the Web Storage API provides access to the session storage or local storage for a particular domain, allowing you to for example add, modify or delete stored data items.

Documentation Storage by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Variables

read only length:Int

Returns an integer representing the number of data items stored in the Storage object.

Methods

clear ():Void

Throws:

null DOMError

getItem (key:String):String

Throws:

null DOMError

key (index:Int):String

Throws:

null DOMError

removeItem (key:String):Void

Throws:

null DOMError

setItem (key:String, value:String):Void

Throws:

null DOMError

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Storage.html