Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's right. Exactly!

I wanted the document to be edited without a separate editor.




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


If 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


script 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.


These 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.


You are definitely misremembering, unless you are talking about external JS files on ancient MSIE versions I think.


It’s a nice idea.. good job.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: