IE11 fixes

This commit is contained in:
juliandescottes 2017-05-06 21:57:41 +02:00 committed by Julian Descottes
parent 00d4a1614b
commit 4f15b14b58
2 changed files with 13 additions and 7 deletions

View File

@ -22,7 +22,7 @@
},
isIntegrationTest : function () {
return new window.URL(window.location).searchParams.has('integration-test');
return window.location.href.indexOf('integration-test') !== -1;
}
};

View File

@ -83,11 +83,17 @@
return sanitizedString;
},
_getDummyEl : function () {
if (!ns.Template._dummyEl) {
ns.Template._dummyEl = document.createElement('div');
}
return ns.Template._dummyEl;
}
_getDummyEl : pskl.utils.UserAgent.isIE11 ?
// IE11 specific implementation
function () {
return document.createElement('div');
}
// Normal, sane browsers implementation.
: function () {
if (!ns.Template._dummyEl) {
ns.Template._dummyEl = document.createElement('div');
}
return ns.Template._dummyEl;
}
};
})();