diff --git a/src/lib/WebVM.svelte b/src/lib/WebVM.svelte
index ee5b540..ff819bf 100644
--- a/src/lib/WebVM.svelte
+++ b/src/lib/WebVM.svelte
@@ -14,6 +14,7 @@
import { introMessage, errorMessage } from '$lib/messages.js'
export let configObj = null;
+ export let processCallback = null;
var term = new Terminal({cursorBlink:true, convertEol:true, fontFamily:"monospace", fontWeight: 400, fontWeightBold: 700});
var cx = null;
@@ -22,6 +23,7 @@
var linkAddon = new WebLinksAddon();
term.loadAddon(linkAddon);
var cxReadFunc = null;
+ var processCount = 0;
function writeData(buf, vt)
{
if(vt != 1)
@@ -78,6 +80,12 @@
const display = document.getElementById("display");
display.style.zIndex = 10;
}
+ function handleProcessCreated()
+ {
+ processCount++;
+ if(processCallback)
+ processCallback(processCount);
+ }
async function initCheerpX()
{
// TODO: Check for SAB support
@@ -142,6 +150,7 @@
}
cx.registerCallback("cpuActivity", cpuCallback);
cx.registerCallback("diskActivity", hddCallback);
+ cx.registerCallback("processCreated", handleProcessCreated);
term.scrollToBottom();
cxReadFunc = cx.setCustomConsole(writeData, term.cols, term.rows);
const display = document.getElementById("display");
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index a9de55b..8f4c942 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,6 +1,14 @@
-
+
diff --git a/src/routes/alpine/+page.svelte b/src/routes/alpine/+page.svelte
index b3e7a7f..b9099ce 100644
--- a/src/routes/alpine/+page.svelte
+++ b/src/routes/alpine/+page.svelte
@@ -1,6 +1,14 @@
-
+