diff --git a/src/js/README.md b/src/js/README.md index 23e6c4dc4..ccebac913 100644 --- a/src/js/README.md +++ b/src/js/README.md @@ -6,9 +6,7 @@ nav_order: 0 # Javascript -GNOLL is currently supported in Node as a console level application. -It is **not** supported in the browser yet. -We appreciate contributions that can change this. +GNOLL is currently supported in Node as a console level application and as a browser package. Emscripten does not allow file writing [ref](https://stackoverflow.com/a/54384808), at least via the same mechanism as the other languages, @@ -22,14 +20,19 @@ Output is currently only via stdout. sudo apt-get install emscripten nodejs ``` -### Build +### Run (Console) ```bash make javascript ``` -### Run - ```bash node build/js/a.out.js ``` + +### Run (Browser) + +Build with `make all jsweb` +Start a web server (e.g. `python3 -m http.server 8003 &> /dev/null &`) +Load index.html (http://localhost:8003/index.html in the previous example). +Provide notation in the textbox and press the "Roll" button. Output is printed to a separate div.