minor fixes

This commit is contained in:
Ilya Kantor 2021-07-23 10:14:55 +03:00
parent 2957e71a05
commit 1b1a2c4b66
2 changed files with 2 additions and 2 deletions

View file

@ -114,7 +114,7 @@ The example below correctly shows image sizes, because `window.onload` waits for
```html run height=200 refresh ```html run height=200 refresh
<script> <script>
window.onload = function() { window.onload = function() { // can also use window.addEventListener('load', (event) => {
alert('Page loaded'); alert('Page loaded');
// image is loaded at this time // image is loaded at this time

View file

@ -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 => { window.onstorage = event => { // can also use 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);
}; };