JavaScript is required for making a webpage’s content dynamic. Without JavaScript, things like Twine would not exist. The web-based interpreters for parser adventures would not exist.
It is possible to run a webserver and return dynamically rendered static webpages with every click (and with every parser command). This would alleviate the need for JavaScript. Each interaction would be a new webpage to download, essentially.
An IF engine could be developed to support this, but it would be very web traffic heavy and could not run locally on a machine offline.
Another alternative to present locally run JavaScript enabled IF is to package it into a browser executable. For example, a Chromium browser can be packaged with the webpages and web media and use JavaScript in it’s own application scope. However, there a level of risk with running executables from unknown and untrusted sources.
The web browser has security built-in to stop a webpage from accessing the user’s hard drive files. It seems to be pretty secure at present and the major browser companies are constantly updating their software.
I’m not trying to sway you in any direction. I’m just presenting the situation as I understand it.