background: currentColor;
}
</style>
- <script type="module"><![CDATA[
+ <!-- Script is async rather than deferred because Chromium can't
+ handle deferred scripts in XHTML.
+ https://issues.chromium.org/issues/40518469 -->
+ <script type="module" async="async"><![CDATA[
import Bedstead from './bedstead.js';
function update_glyph() {
var args = [];
}
});
}
- for (var e of document.getElementsByTagName('input')) {
- e.onchange = update_glyph;
+ function init() {
+ for (var e of document.getElementsByTagName('input')) {
+ e.onchange = update_glyph;
+ }
+ update_glyph();
+ }
+ // This script is loaded asynchronously, so make sure the DOM is
+ // loaded before touching it.
+ if (document.readyState === "loading") {
+ document.addEventListener("DOMContentLoaded", init);
+ } else {
+ init();
}
- update_glyph();
]]>
</script>
</head>