Slightly optimize vertical jiggering by pre-computing all widgets on page load

This commit is contained in:
Zef Hemel
2026-05-12 09:38:17 +02:00
parent 32d0ee8f64
commit a96a86c0b5
6 changed files with 61 additions and 6 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
import type { SysCallMapping } from "../../plugos/system.ts";
import type { Client } from "../../client.ts";
import { reloadAllWidgets } from "../../codemirror/code_widget.ts";
import { broadcastReload } from "../../components/widget_sandbox_iframe.ts";
export function clientCodeWidgetSyscalls(): SysCallMapping {
export function clientCodeWidgetSyscalls(client: Client): SysCallMapping {
return {
"codeWidget.refreshAll": () => {
client.widgetCache.clearPrewarm();
broadcastReload();
return reloadAllWidgets();
},