put all initializations together
This commit is contained in:
parent
9efbe26cdd
commit
6d9b095778
8
main.js
8
main.js
|
|
@ -51,10 +51,6 @@ function evaluate() {
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
const expr = document.querySelector("#expr");
|
|
||||||
let selectionStart = 0;
|
|
||||||
let selectionEnd = 0;
|
|
||||||
|
|
||||||
function setupExprInput() {
|
function setupExprInput() {
|
||||||
selectionStart = expr.selectionStart;
|
selectionStart = expr.selectionStart;
|
||||||
selectionEnd = expr.selectionEnd;
|
selectionEnd = expr.selectionEnd;
|
||||||
|
|
@ -121,6 +117,10 @@ function switchInputs(enabled) {
|
||||||
document.querySelector("#modulus").disabled = !enabled;
|
document.querySelector("#modulus").disabled = !enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const expr = document.querySelector("#expr");
|
||||||
|
let selectionStart = 0;
|
||||||
|
let selectionEnd = 0;
|
||||||
|
|
||||||
let timeoutId = null;
|
let timeoutId = null;
|
||||||
const worker = new Worker("./workers/compute.js");
|
const worker = new Worker("./workers/compute.js");
|
||||||
worker.addEventListener("message", (message) => {
|
worker.addEventListener("message", (message) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue