mirror of
https://github.com/WilliamsNY/contain-element.git
synced 2024-11-23 22:24:10 -05:00
Remove callbacks in examples.
There's no need to put a function in a callback if we're doing absolutely nothing else with either callbacks.
This commit is contained in:
parent
3183927aac
commit
7e9fa72a31
1 changed files with 2 additions and 2 deletions
|
@ -26,10 +26,10 @@ window.onload = function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// (example) update the size and positioning on window resize
|
// (example) update the size and positioning on window resize
|
||||||
window.onresize = function() { 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', function() { contain.update(); });
|
screen.addEventListener('orientationchange', contain.update);
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue