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