Project

General

Profile

Bug #5545 ยป 0001-Fix-JS-error-in-ScrollVisibility.js-with-IE9.patch

Bruce Toll, 02/09/2017 08:33 PM

View differences:

src/js/ScrollVisibility.js
}
var mutObserver = null;
var intervalObserver = null;
if (window.hasOwnProperty('MutationObserver')) {
mutObserver = new MutationObserver(visibilityChecker);
}
......
}
} else {
// IE < 11 does not have MutationObserver, so use 100 ms polling instead.
mutObserver = setInterval(visibilityChecker, 100);
intervalObserver = setInterval(visibilityChecker, 100);
}
}
......
window.removeEventListener('resize', visibilityChecker, {capture:true});
window.removeEventListener('scroll', visibilityChecker, {capture:true});
}
} else {
} else if (intervalObserver) {
// IE < 11 does not have MutationObserver, so use 100 ms polling instead.
clearInterval(mutObserver);
mutObserver = null;
clearInterval(intervalObserver);
intervalObserver = null;
}
}
    (1-1/1)