mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Fix feature detection for module browsers that do not support dynamic… (#6069)
This commit is contained in:
parent
f354e1eb0f
commit
6c8aedfb8b
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user