跳到主要内容

DOMStorage🧪

查询和修改DOM存储。

EN
Query and modify DOM storage.

✅️️ Methods

🔨DOMStorage.clear

参数必填标记类型描述原文
storageId✔️StorageId

🔨DOMStorage.disable

禁用存储跟踪,防止存储事件被发送到客户端。

EN
Disables storage tracking, prevents storage events from being sent to the client.

🔨DOMStorage.enable

启用存储追踪功能,存储事件现在将传递给客户端。

EN
Enables storage tracking, storage events will now be delivered to the client.

🔨DOMStorage.getDOMStorageItems

参数必填标记类型描述原文
storageId✔️StorageId
返回对象类型描述原文
entriesarray[Item]

🔨DOMStorage.removeDOMStorageItem

参数必填标记类型描述原文
storageId✔️StorageId
key✔️string

🔨DOMStorage.setDOMStorageItem

参数必填标记类型描述原文
storageId✔️StorageId
key✔️string
value✔️string

✅️️ Events

👋DOMStorage.domStorageItemAdded

参数必填标记类型描述原文
storageId✔️StorageId
key✔️string
newValue✔️string

👋DOMStorage.domStorageItemRemoved

参数必填标记类型描述原文
storageId✔️StorageId
key✔️string

👋DOMStorage.domStorageItemsCleared

参数必填标记类型描述原文
storageId✔️StorageId

👋DOMStorage.domStorageItemUpdated

参数必填标记类型描述原文
storageId✔️StorageId
key✔️string
oldValue✔️string
newValue✔️string

✅️️ Types

📌DOMStorage.Item

DOM Storage 项。

EN
DOM Storage item.

返回类型:array


📌DOMStorage.SerializedStorageKey

返回类型:string


📌DOMStorage.StorageId

DOM Storage 标识符。

EN
DOM Storage identifier.

返回类型:object

属性必填标记类型描述原文
securityOriginstring存储的安全源。
ENSecurity origin for the storage.
storageKeySerializedStorageKey表示DOM Storage用于索引其CachedStorageAreas的键
ENRepresents a key by which DOM Storage keys its CachedStorageAreas
isLocalStorage✔️boolean该存储是否为本地存储(非会话存储)。
ENWhether the storage is local storage (not session storage).