2023-10-31 09:33:38 +00:00
|
|
|
import type { CodeWidgetContent } from "$sb/types.ts";
|
|
|
|
import { syscall } from "./syscall.ts";
|
|
|
|
|
|
|
|
export function render(
|
|
|
|
lang: string,
|
|
|
|
body: string,
|
|
|
|
pageName: string,
|
|
|
|
): Promise<CodeWidgetContent> {
|
|
|
|
return syscall("codeWidget.render", lang, body, pageName);
|
|
|
|
}
|
2023-11-15 09:08:21 +00:00
|
|
|
|
|
|
|
// Refresh all code widgets on the page that support it
|
|
|
|
export function refreshAll() {
|
|
|
|
return syscall("codeWidget.refreshAll");
|
|
|
|
}
|