silverbullet/web/syscalls/client_code_widget.ts

13 lines
384 B
TypeScript
Raw Permalink Normal View History

2024-07-30 23:33:33 +08:00
import type { SysCallMapping } from "../../lib/plugos/system.ts";
2024-10-13 21:14:22 +08:00
import { reloadAllWidgets } from "../cm_plugins/markdown_widget.ts";
2023-11-15 17:08:21 +08:00
import { broadcastReload } from "../components/widget_sandbox_iframe.ts";
export function clientCodeWidgetSyscalls(): SysCallMapping {
return {
"codeWidget.refreshAll": () => {
broadcastReload();
2024-10-13 21:14:22 +08:00
reloadAllWidgets();
2023-11-15 17:08:21 +08:00
},
};
}