StorageEvent
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
当前页面使用的 storage 被其他页面修改时会触发 StorageEvent 事件。
[译者:事件在同一个域下的不同页面之间触发,即在 A 页面注册了 storge 的监听处理,只有在跟 A 同域名下的 B 页面操作 storage 对象,A 页面才会被触发 storage 事件]
构造函数
StorageEvent()
-
返回新构造的
StorageEvent
对象。
实例属性
实例方法
除了下面列出的方法以外,此接口还继承了其父接口 Event
的方法。
initStorageEvent()
已弃用-
以类似于 DOM 事件接口中名称相似的
initEvent()
方法的方式初始化事件。请改用构造函数。
规范
Specification |
---|
HTML # the-storageevent-interface |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StorageEvent | |||||||||||||
StorageEvent() constructor | |||||||||||||
initStorageEvent | |||||||||||||
key | |||||||||||||
newValue | |||||||||||||
oldValue | |||||||||||||
storageArea | |||||||||||||
url |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Deprecated. Not for use in new websites.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.