Skip to content
Toby Dylan Hocking edited this page Nov 10, 2021 · 18 revisions

Web browser on local index.html file is blank?

These days most web browsers have a default setting which blocks execution of JavaScript from local files. The easiest way to solve this issue is by enabling local JavaScript execution in your web browser. For example in Firefox:

  • Open up a new tab. Type or paste about:config in the address bar and press Enter.
  • A button appears asking if you accept the risk to change advanced settings. Click that you accept the risk.
  • Type unique in the search box, which will filter the list for words containing this word.
  • Double click the privacy.file_unique_origin preference to switch the value from true to false

Or in Chrome follow this SO answer: https://stackoverflow.com/questions/20748630/load-local-javascript-file-in-chrome-for-testing/25107674

Alternately, if you can't turn on local JavaScript execution in your web browser for some reason, then you can try serving the animint html/JS using a local web server, which should work with any web browser. After rendering, animint2 prints a message which says to try using servr::httd("path/to/index.html") which should open a browser window with that URL. (and it should render the animint in that web page, whether or not you switch the privacy.file_unique_origin preference)

Clone this wiki locally