3 ms·
Well, that's why I include JS files at the bottom of my HTML body, to make sure to avoid exactly this problem: https://github.com/yawaramin/dream-html-ui/blob/9
by yawaramin 10mo ago
Well, that's why I include JS files at the bottom of my HTML body, to make sure to avoid exactly this problem: https://github.com/yawaramin/dream-html-ui/blob/92f2dfc51b75e4ff54fea07c905738601989fb2a/dh-combobox.html#L119 https://github.com/yawaramin/dream-html-ui/blob/92f2dfc51b75...
- dannye 10mo agoOne drawback. ► execute <script> at bottom of file ► execute <script defer> Both do the same; they execute script after DOM was parsed. When your JS creates GUI you now have to battle FOUCs. ► "import" loads your script async so it _could_ load before _all_ DOM has parsed... but 9999 out of 10000 scenarios it won't
- yawaramin 10mo agoThat's why my JS doesn't create the GUI, it just attaches event handlers to the GUI rendered on the server. Check the link I posted above...