From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/api/window/storage_event/index.html | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 files/zh-cn/web/api/window/storage_event/index.html (limited to 'files/zh-cn/web/api/window/storage_event') diff --git a/files/zh-cn/web/api/window/storage_event/index.html b/files/zh-cn/web/api/window/storage_event/index.html new file mode 100644 index 0000000000..81d66d57bc --- /dev/null +++ b/files/zh-cn/web/api/window/storage_event/index.html @@ -0,0 +1,85 @@ +--- +title: storage +slug: Web/API/Window/storage_event +tags: + - Web Storage + - 事件 +translation_of: Web/API/Window/storage_event +--- +

当存储区域(localStorage 或 sessionStorage)被修改时,将触发 storage 事件。查看 Web Storage API 来获取更多信息。

+ +

常规信息

+ +
+
说明
+
Web Storage
+
接口
+
{{domxref("StorageEvent")}}
+
是否冒泡
+
No
+
默认行为可取消
+
No
+
目标
+
DefaultView (<window>)
+
默认行为
+
+
+ +

属性

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
target {{readonlyInline}}{{domxref("EventTarget")}}事件目标(DOM 树中的最大目标)
type {{readonlyInline}}{{domxref("DOMString")}}事件的类型
bubbles {{readonlyInline}}{{jsxref("Boolean")}}事件通常是否会出现冒泡
cancelable {{readonlyInline}}{{jsxref("Boolean")}}事件是否可取消
key {{readonlyInline}}{{domxref("DOMString")}} (string)键更改时
oldValue {{readonlyInline}}{{domxref("DOMString")}} (string)正在更改键的旧值
newValue {{readonlyInline}}{{domxref("DOMString")}} (string)正在更改键的新值
url {{readonlyInline}}{{domxref("DOMString")}} (string)键更改的文档的地址
storageArea {{readonlyInline}}{{domxref("Storage")}}受影响的存储对象
-- cgit v1.2.3-54-g00ecf