Storage

Overview

The Storage interface of the Web Storage API provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.

Location

 

clear

When invoked, will empty all keys out of the storage.

 

method clear

 

void clear()

 

func clear()

 

void clear()

 

Sub clear()

getItem

When passed a key name, will return that key's value.

 

method getItem(parkeyName: dynamic): String

 

String getItem(dynamic parkeyName)

 

func getItem(_ parkeyName: dynamic) -> String

 

String getItem(dynamic parkeyName)

 

Function getItem(parkeyName As dynamic) As String

Parameters:

  • parkeyName:

key

When passed a number n, this method will return the name of the nth key in the storage.

 

method key(parindex: dynamic): String

 

String key(dynamic parindex)

 

func key(_ parindex: dynamic) -> String

 

String key(dynamic parindex)

 

Function key(parindex As dynamic) As String

Parameters:

  • parindex:

length

 

property length: Int32 read;

 

Int32 length { get; }

 

var length: Int32 { get{} }

 

Int32 length { __get; }

 

ReadOnly Property length() As Int32

removeItem

When passed a key name, will remove that key from the storage.

 

method removeItem(parkeyName: dynamic)

 

void removeItem(dynamic parkeyName)

 

func removeItem(_ parkeyName: dynamic)

 

void removeItem(dynamic parkeyName)

 

Sub removeItem(parkeyName As dynamic)

Parameters:

  • parkeyName:

setItem

When passed a key name and value, will add that key to the storage, or update that key's value if it already exists.

 

method setItem(parkeyName: dynamic; parkeyValue: dynamic)

 

void setItem(dynamic parkeyName, dynamic parkeyValue)

 

func setItem(_ parkeyName: dynamic, _ parkeyValue: dynamic)

 

void setItem(dynamic parkeyName, dynamic parkeyValue)

 

Sub setItem(parkeyName As dynamic, parkeyValue As dynamic)

Parameters:

  • parkeyName:
  • parkeyValue:

 

length

 

property length: Int32 read;

 

Int32 length { get; }

 

var length: Int32 { get{} }

 

Int32 length { __get; }

 

ReadOnly Property length() As Int32

 

clear

When invoked, will empty all keys out of the storage.

 

method clear

 

void clear()

 

func clear()

 

void clear()

 

Sub clear()

getItem

When passed a key name, will return that key's value.

 

method getItem(parkeyName: dynamic): String

 

String getItem(dynamic parkeyName)

 

func getItem(_ parkeyName: dynamic) -> String

 

String getItem(dynamic parkeyName)

 

Function getItem(parkeyName As dynamic) As String

Parameters:

  • parkeyName:

key

When passed a number n, this method will return the name of the nth key in the storage.

 

method key(parindex: dynamic): String

 

String key(dynamic parindex)

 

func key(_ parindex: dynamic) -> String

 

String key(dynamic parindex)

 

Function key(parindex As dynamic) As String

Parameters:

  • parindex:

removeItem

When passed a key name, will remove that key from the storage.

 

method removeItem(parkeyName: dynamic)

 

void removeItem(dynamic parkeyName)

 

func removeItem(_ parkeyName: dynamic)

 

void removeItem(dynamic parkeyName)

 

Sub removeItem(parkeyName As dynamic)

Parameters:

  • parkeyName:

setItem

When passed a key name and value, will add that key to the storage, or update that key's value if it already exists.

 

method setItem(parkeyName: dynamic; parkeyValue: dynamic)

 

void setItem(dynamic parkeyName, dynamic parkeyValue)

 

func setItem(_ parkeyName: dynamic, _ parkeyValue: dynamic)

 

void setItem(dynamic parkeyName, dynamic parkeyValue)

 

Sub setItem(parkeyName As dynamic, parkeyValue As dynamic)

Parameters:

  • parkeyName:
  • parkeyValue: