mirror of
https://github.com/pfalstad/circuitjs1.git
synced 2026-02-19 17:31:20 +01:00
rename circuitws.mjs to avoid mime type issues
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user