Use "nomodule" instead of manual check
Very few browsers are left in the wild that supports modules but not "nomodule", so let's simplify our handling a bit. Safari 10 supports modules but not 'nomodule', this means that this particular version of Safari will be broken. Due to this we have to bump up the required Safari version to 11.
This commit is contained in:
committed by
Samuel Mannehed
parent
e1d50c8c10
commit
0b51419ca4
12
vnc.html
12
vnc.html
@@ -57,17 +57,7 @@
|
||||
<!-- promise polyfills promises for IE11 -->
|
||||
<script src="vendor/promise.js"></script>
|
||||
<!-- ES2015/ES6 modules polyfill -->
|
||||
<script type="module">
|
||||
window._noVNC_has_module_support = true;
|
||||
</script>
|
||||
<script>
|
||||
window.addEventListener("load", function() {
|
||||
if (window._noVNC_has_module_support) return;
|
||||
var loader = document.createElement("script");
|
||||
loader.src = "vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
|
||||
document.head.appendChild(loader);
|
||||
});
|
||||
</script>
|
||||
<script nomodule src="vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></script>
|
||||
<!-- actual script modules -->
|
||||
<script type="module" crossorigin="anonymous" src="app/ui.js"></script>
|
||||
<!-- end scripts -->
|
||||
|
||||
Reference in New Issue
Block a user