MOBILE-2443 ios: Fix blank screen in iOS 8 and 9

main
Dani Palou 2018-07-03 11:37:39 +02:00
parent ef20b3c3dd
commit 1aa17874a6
1 changed files with 6 additions and 4 deletions

View File

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