Little help/remainder: importing an external JavaScript file into index.html

If your imported external JavaScript code seems to not working, even though you used
script src="code.js">, you may forget about adding the 'async'. You may add this attribute into your index.html like that:

::: spoiler spoiler <script src="code.js" async> :::

it may seem irrelevant, but sometimes little things like that may help :)

2 points · 2 comments · view on lemmy.world

2 Comments

Dominic8999@lemm.ee · 1 pts · 3y

Note: I removed the first "<" in "script src="code.js">" because it didn't accept it to write

Dominic8999@lemm.ee · 1 pts · 3y

Note: I removed the first "<" because it didn't accept it to write.