1
0
silverbullet/web/syscalls/client_code_widget.ts
2023-12-28 16:14:30 +01:00

13 lines
391 B
TypeScript

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