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
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|