mirror of
https://github.com/WilliamsNY/contain-element.git
synced 2024-11-24 14:41:26 -05:00
Use window.addEventListener rather than screen.addEventListener in the example, as the former isn't supported by (at least) chrome/chromium
This commit is contained in:
parent
f3b5b6354b
commit
17c772c5c9
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ window.onload = function() {
|
||||||
window.onresize = contain.update;
|
window.onresize = contain.update;
|
||||||
|
|
||||||
// (example) update the size and positioning on orientation change
|
// (example) update the size and positioning on orientation change
|
||||||
screen.addEventListener('orientationchange', contain.update);
|
window.addEventListener('orientationchange', contain.update);
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue