mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
throttle check on scroll
This commit is contained in:
parent
83650961f8
commit
a574c68975
4 changed files with 100 additions and 46 deletions
|
@ -51,9 +51,8 @@ EPUBJS.Queue.prototype.dequeue = function(){
|
|||
if(this._q.length) {
|
||||
inwait = this._q.shift();
|
||||
task = inwait.task;
|
||||
|
||||
//console.log(task)
|
||||
if(task){
|
||||
|
||||
// Task is a function that returns a promise
|
||||
return task.apply(this.context, inwait.args).then(function(){
|
||||
inwait.deferred.resolve.apply(inwait.context || this.context, arguments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue