4 ms·
I'm curious, somehow I remebered as JS not getting executed when opening a html file from filesystem, but clearly that isn't the case since this works. Did this
by _def 2y ago
I'm curious, somehow I remebered as JS not getting executed when opening a html file from filesystem, but clearly that isn't the case since this works. Did this change? Maybe I'm just misremembering
- lifthrasiir 2y agoYou are definitely misremembering, unless you are talking about external JS files on ancient MSIE versions I think.
- chrisldgk 2y agoIf the JS is embedded within the HTML file it should’ve always worked, but when the HTML loads the JS file from somewhere else (that isn’t a relative path or a full URL that’s hosted somewhere else) it would usually fail, thus it wouldn’t work without running it through some kind of server that resolves the path
- recursive 2y agoscript type="module" doesn't work from file systems. To my great annoyance. Other than that, I'm quite certain JS has worked from file systems since it existed.
- yevgenyhong 2y agoThese days, local html seems to be running javascripts. If you send html to Telegram, the preview will not run js when the recipient opens it. I think Android and IOS work differently.