Slightly optimize vertical jiggering by pre-computing all widgets on page load
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user