mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Chrome tab background performance fixes (#977)
* Add listener to detect when in background and disable polling. * Remove polling.
This commit is contained in:
parent
d9c2559b21
commit
589f5ce9e5
1 changed files with 1 additions and 4 deletions
|
@ -386,7 +386,6 @@ class Contents {
|
|||
* @private
|
||||
*/
|
||||
listeners() {
|
||||
|
||||
this.imageLoadListeners();
|
||||
|
||||
this.mediaQueryListeners();
|
||||
|
@ -448,9 +447,7 @@ class Contents {
|
|||
var width, height;
|
||||
// Test size again
|
||||
clearTimeout(this.expanding);
|
||||
|
||||
requestAnimationFrame(this.resizeCheck.bind(this));
|
||||
this.expanding = setTimeout(this.resizeListeners.bind(this), 350);
|
||||
requestAnimationFrame(this.resizeCheck.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue