Fix typo in 6.2 (LocalStorage, sessionStorage)
This commit is contained in:
parent
e1a3f634a4
commit
441e720c04
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ If both windows are listening for `window.onstorage`, then each one will react o
|
||||||
|
|
||||||
```js run
|
```js run
|
||||||
// triggers on updates made to the same storage from other documents
|
// triggers on updates made to the same storage from other documents
|
||||||
window.onstorage = event => { // same as window.addEventListener('storage', () => {
|
window.onstorage = event => { // same as window.addEventListener('storage', event => {
|
||||||
if (event.key != 'now') return;
|
if (event.key != 'now') return;
|
||||||
alert(event.key + ':' + event.newValue + " at " + event.url);
|
alert(event.key + ':' + event.newValue + " at " + event.url);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue