chiark / gitweb /
webstead: use a non-module <script> and import()
authorBen Harris <bjh21@bjh21.me.uk>
Mon, 6 Oct 2025 23:16:01 +0000 (00:16 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 13 Jan 2026 21:42:18 +0000 (21:42 +0000)
commite6b411252b93c6d0787c1326e4d1a44089b4952b
tree6353b1e509074052080027e0a67b00cc38fd178d
parent1edf533277b3b6c830ee7dcafea3affe7e5ca020
webstead: use a non-module <script> and import()

According to <https://github.com/fuweichin/xhtml5-esm-support>, an
internal script (a <script> element with content) can't be a module in
an XHTML page in Safari.  So following the suggestion on that page, I
make the <script> on the page into a classic script, and use import()
to load the module containing the bedstead executable.  Maybe this
will work on a reasonable selection of modern browsers.
webstead.xhtml