mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
feat(js): load app.js
using JavaScript module
- The JS bundle has its own isolated scope - There is no need to use IIFEs anymore (Immediately Invoked Function Expressions) - Modules are executed after the HTML document is fully parsed, similar to `defer` attribute - There is no need to use `DOMContentLoaded` anymore - Module scripts inherently run in strict mode (no need to define `use strict` anymore)
This commit is contained in:
parent
50197c2be3
commit
bfbc1c88c3
4 changed files with 172 additions and 187 deletions
|
@ -48,7 +48,7 @@
|
|||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src * data:; media-src *; frame-src *; require-trusted-types-for 'script'; trusted-types ttpolicy;">
|
||||
{{ end }}
|
||||
|
||||
<script src="{{ route "javascript" "name" "app" "checksum" .app_js_checksum }}" defer></script>
|
||||
<script src="{{ route "javascript" "name" "app" "checksum" .app_js_checksum }}" type="module"></script>
|
||||
<script src="{{ route "javascript" "name" "service-worker" "checksum" .sw_js_checksum }}" defer id="service-worker-script"></script>
|
||||
</head>
|
||||
<body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue