Merge pull request #1386 from dpalou/MOBILE-2443

MOBILE-2443 ios: Fix blank screen in iOS 8 and 9
main
Juan Leyva 2018-07-04 10:41:24 +02:00 committed by GitHub
commit eda840ccb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -14,20 +14,22 @@
(function () {
'use strict';
var EvTarget = EventTarget || Element; // EventTarget doesn't exist in iOS 8 and 9.
window.addEventListener = function () {
EventTarget.prototype.addEventListener.apply(this, arguments);
EvTarget.prototype.addEventListener.apply(this, arguments);
};
window.removeEventListener = function () {
EventTarget.prototype.removeEventListener.apply(this, arguments);
EvTarget.prototype.removeEventListener.apply(this, arguments);
};
document.addEventListener = function () {
EventTarget.prototype.addEventListener.apply(this, arguments);
EvTarget.prototype.addEventListener.apply(this, arguments);
};
document.removeEventListener = function () {
EventTarget.prototype.removeEventListener.apply(this, arguments);
EvTarget.prototype.removeEventListener.apply(this, arguments);
};
})();
</script>