Fix feature detection for module browsers that do not support dynamic… (#6069)

This commit is contained in:
Paulus Schoutsen 2020-05-28 12:28:58 -07:00 committed by GitHub
parent f354e1eb0f
commit 6c8aedfb8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,20 +52,19 @@
<%= renderTemplate('_js_base') %>
<%= renderTemplate('_preload_roboto') %>
<script type="module" crossorigin="use-credentials">
<script>
import("<%= latestCoreJS %>");
import("<%= latestAppJS %>");
window.customPanelJS = "<%= latestCustomPanelJS %>";
window.latestJS = true;
</script>
{% for extra_module in extra_modules -%}
<script type="module" crossorigin="use-credentials" src="{{ extra_module }}"></script>
{% endfor -%}
<script nomodule>
<script>
(function() {
// Safari 10.1 supports type=module but ignores nomodule, so we add this check.
if (!isS101) {
if (!window.latestJS) {
window.customPanelJS = "<%= es5CustomPanelJS %>";
_ls("/static/polyfills/custom-elements-es5-adapter.js");