silverbullet/web/syscalls/client_code_widget.ts

13 lines
395 B
TypeScript
Raw Normal View History

import { SysCallMapping } from "../../lib/plugos/system.ts";
import { reloadAllMarkdownWidgets } 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();
reloadAllMarkdownWidgets();
2023-11-15 17:08:21 +08:00
},
};
}