Closed toofar closed 5 years ago
For all website related issues, open the issue in the https://github.com/janet-lang/janet-lang.org repo.
It doesn't really matter in this case. JavaScript "good practice" is for writing packages and large, JavaScript heavy websites. If a custom scripts break with unexpected globals, you need to fix your scripts. It's an easy enough fix though.
On https://janet-lang.org/ repl.js defines methods in the global scope. In particular
print()
which ends up overridingwindow.print()
. This probably wont break printing the page in browsers because they wouldn't use the JS API but it might break peoples custom scripts and is not good practice. Everything should be wrapped in an IIFE and anything you need accessable onwindow
from elsewhere should be put there explicitly.