Interface IStorage
Interface IStorage
Namespace: Aspose.Html.Dom
Assembly: Aspose.HTML.dll (25.1.0)
このWeb Storage APIのインターフェースは、特定のドメインのセッションまたはローカルストレージへのアクセスを提供します。
Web Storage仕様を参照してください: https://html.spec.whatwg.org/multipage/webstorage.html#webstorage
[ComVisible(true)]
[DOMObject]
[DOMName("Storage")]
public interface IStorage
プロパティ
Length
キー/値ペアの数を返します。
[DOMName("length")]
long Length { get; }
プロパティの値
メソッド
Clear()
存在する場合、すべてのキー/値ペアを削除します。
[DOMName("clear")]
void Clear()
GetItem(string)
指定されたキーに関連付けられた現在の値を返し、指定されたキーが存在しない場合はnullを返します。
[DOMName("getItem")]
string GetItem(string key)
パラメーター
key
string
アイテムキーの文字列。
戻り値
アイテム値の文字列。
Key(long)
n番目のキーの名前を返し、nがキー/値ペアの数以上の場合はnullを返します。
[DOMName("key")]
string Key(long n)
パラメーター
n
long
ストレージアイテムの数。
戻り値
キーの文字列。
RemoveItem(string)
指定されたキーのキー/値ペアを削除します。指定されたキーのキー/値ペアが存在する場合に限ります。
[DOMName("removeItem")]
void RemoveItem(string key)
パラメーター
key
string
アイテムキーの文字列。
SetItem(string, string)
キーで識別されるペアの値をvalueに設定し、以前にキーに対して存在しなかった場合は新しいキー/値ペアを作成します。
[DOMName("setItem")]
void SetItem(string key, string value)
パラメーター
key
string
アイテムキーの文字列。
value
string
アイテム値の文字列。