Table of Contents

Class Storage

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

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.

[Value("Storage")]
public class Storage
Inheritance
Storage
Inherited Members

Remarks

To manipulate, for instance, the session storage for a domain, a call to Window.SessionStorage is made; whereas for local storage the call is made to Window.LocalStorage.

-Using the Web Storage API
-Window.LocalStorage
-Window.SessionStorage
-CacheStorage

See also on MDN

Constructors

Storage()

public Storage()

Properties

Length

The length read-only property of the
Storage interface returns the number of data items stored in a given
Storage object.

[Value("length")]
public ulong Length { get; }

Property Value

ulong

The number of items stored in the Storage object.

Remarks

Methods

Clear()

The clear() method of the Storage
interface clears all keys stored in a given Storage object.

[Value("clear")]
public GlobalObject.Undefined Clear()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Key(ulong)

The key() method of the Storage interface,
when passed a number n, returns the name of the nth key in a given Storage
object. The order of keys is user-agent defined, so you should not rely on it.

[Value("key")]
public string? Key(ulong index)

Parameters

index ulong

Returns

string

A string containing the name of the key. If the index does not exist,
null is returned.

Remarks