silverbullet/web/syscalls/client_code_widget.ts

13 lines
384 B
TypeScript

import type { SysCallMapping } from "../../lib/plugos/system.ts";
import { reloadAllWidgets } from "../cm_plugins/markdown_widget.ts";
import { broadcastReload } from "../components/widget_sandbox_iframe.ts";
export function clientCodeWidgetSyscalls(): SysCallMapping {
return {
"codeWidget.refreshAll": () => {
broadcastReload();
reloadAllWidgets();
},
};
}