Ensure load order (#3346)

This commit is contained in:
Paulus Schoutsen 2019-07-10 09:27:25 -07:00 committed by GitHub
parent 2929db5ba4
commit cdd007cc54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
document.createElement("script"),
doc.lastChild
);
script.type = "text/javascript";
script.defer = true;
script.src = src;
}
window.Polymer = {
@ -15,11 +15,9 @@
suppressTemplateNotifications: true,
suppressBindingNotifications: true,
};
var webComponentsSupported =
"customElements" in window &&
"content" in document.createElement("template");
if (!webComponentsSupported) {
_ls("/static/polyfills/webcomponents-bundle.js");
if (!("customElements" in window &&
"content" in document.createElement("template"))) {
document.write("<script src='/static/polyfills/webcomponents-bundle.js'>");
}
var isS101 = /\s+Version\/10\.1(?:\.\d+)?\s+Safari\//.test(navigator.userAgent);
</script>