aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/storage_event
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/window/storage_event')
-rw-r--r--files/zh-cn/web/api/window/storage_event/index.html85
1 files changed, 85 insertions, 0 deletions
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
+---
+<p>当存储区域(localStorage 或 sessionStorage)被修改时,将触发 storage 事件。查看 <a href="/en-US/docs/Web/API/Web_Storage_API">Web Storage API</a> 来获取更多信息。</p>
+
+<h2 id="常规信息">常规信息</h2>
+
+<dl>
+ <dt style="float: left; text-align: right; width: 120px;">说明</dt>
+ <dd style="margin: 0 0 0 120px;"><em><a class="external" href="http://www.w3.org/TR/webstorage/#the-storage-event">Web Storage</a></em></dd>
+ <dt style="float: left; text-align: right; width: 120px;">接口</dt>
+ <dd style="margin: 0 0 0 120px;">{{domxref("StorageEvent")}}</dd>
+ <dt style="float: left; text-align: right; width: 120px;">是否冒泡</dt>
+ <dd style="margin: 0 0 0 120px;">No</dd>
+ <dt style="float: left; text-align: right; width: 120px;">默认行为可取消</dt>
+ <dd style="margin: 0 0 0 120px;">No</dd>
+ <dt style="float: left; text-align: right; width: 120px;">目标</dt>
+ <dd style="margin: 0 0 0 120px;">DefaultView (<code>&lt;window&gt;</code>)</dd>
+ <dt style="float: left; text-align: right; width: 120px;">默认行为</dt>
+ <dd style="margin: 0 0 0 120px;">无</dd>
+</dl>
+
+<h2 id="属性">属性</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Property</th>
+ <th scope="col">Type</th>
+ <th scope="col">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>target</code> {{readonlyInline}}</td>
+ <td>{{domxref("EventTarget")}}</td>
+ <td>事件目标(DOM 树中的最大目标)</td>
+ </tr>
+ <tr>
+ <td><code>type</code> {{readonlyInline}}</td>
+ <td>{{domxref("DOMString")}}</td>
+ <td>事件的类型</td>
+ </tr>
+ <tr>
+ <td><code>bubbles</code> {{readonlyInline}}</td>
+ <td>{{jsxref("Boolean")}}</td>
+ <td>事件通常是否会出现冒泡</td>
+ </tr>
+ <tr>
+ <td><code>cancelable</code> {{readonlyInline}}</td>
+ <td>{{jsxref("Boolean")}}</td>
+ <td>事件是否可取消</td>
+ </tr>
+ <tr>
+ <td><code>key</code> {{readonlyInline}}</td>
+ <td>{{domxref("DOMString")}} (string)</td>
+ <td>键更改时</td>
+ </tr>
+ <tr>
+ <td><code>oldValue</code> {{readonlyInline}}</td>
+ <td>{{domxref("DOMString")}} (string)</td>
+ <td>正在更改键的旧值</td>
+ </tr>
+ <tr>
+ <td><code>newValue</code> {{readonlyInline}}</td>
+ <td>{{domxref("DOMString")}} (string)</td>
+ <td>正在更改键的新值</td>
+ </tr>
+ <tr>
+ <td><code>url</code> {{readonlyInline}}</td>
+ <td>{{domxref("DOMString")}} (string)</td>
+ <td>键更改的文档的地址</td>
+ </tr>
+ <tr>
+ <td><code>storageArea</code> {{readonlyInline}}</td>
+ <td>{{domxref("Storage")}}</td>
+ <td>受影响的存储对象</td>
+ </tr>
+ </tbody>
+</table>