rename circuitws.mjs to avoid mime type issues

This commit is contained in:
Paul Falstad
2022-09-10 23:00:22 -07:00
parent 86eef8b2db
commit 609a5e762b
3 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ this can be useful, but generally it allows remote controlling a browser-run
simulation to be controlled and read out from any programming language.
## Usage
You can start by copying `circuitws.html` and `circuitws.mjs` to the `war/`
You can start by copying `circuitws.html` and `circuitws.js` to the `war/`
directory, then serve it from there. You then need to invoke the URI by adding
a `ws=` query string parameter. The code expects to find a WebSocket end point
there and will connect to it (and reconnect if the connection is lost).

View File

@@ -8,7 +8,7 @@
<iframe id="circuitFrame" width=800 height=550></iframe>
<script type="module">
import {CircuitWS} from "./circuitws.mjs";
import {CircuitWS} from "./circuitws.js";
const iframe = document.querySelector("#circuitFrame");
const circuitws = new CircuitWS(iframe);
const search_params = new URLSearchParams(window.location.search);