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 () { 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; return sanitizedString;
}, },
_getDummyEl : function () { _getDummyEl : pskl.utils.UserAgent.isIE11 ?
if (!ns.Template._dummyEl) { // IE11 specific implementation
ns.Template._dummyEl = document.createElement('div'); function () {
} return document.createElement('div');
return ns.Template._dummyEl; }
} // Normal, sane browsers implementation.
: function () {
if (!ns.Template._dummyEl) {
ns.Template._dummyEl = document.createElement('div');
}
return ns.Template._dummyEl;
}
}; };
})(); })();