template fix

pull/570/head
Zef Hemel 2023-11-21 13:26:48 +01:00
parent db607f1661
commit aa5bff548d
3 changed files with 2 additions and 3 deletions

View File

@ -86,7 +86,7 @@ function claimIFrame(): PreloadedIFrame {
export function broadcastReload() { export function broadcastReload() {
for (const preloadedIframe of iframePool) { for (const preloadedIframe of iframePool) {
if (preloadedIframe.used) { if (preloadedIframe.used && preloadedIframe.iframe?.contentWindow) {
// Send a message to the global object, which the iframe is listening to // Send a message to the global object, which the iframe is listening to
globalThis.dispatchEvent( globalThis.dispatchEvent(
new MessageEvent("message", { new MessageEvent("message", {

View File

@ -1,4 +1,3 @@
import { CodeWidgetContent } from "$sb/types.ts";
import { SysCallMapping } from "../../plugos/system.ts"; import { SysCallMapping } from "../../plugos/system.ts";
import { broadcastReload } from "../components/widget_sandbox_iframe.ts"; import { broadcastReload } from "../components/widget_sandbox_iframe.ts";

View File

@ -6,5 +6,5 @@ order: 2
--- ---
```query ```query
task where name =~ /\[\[{{escapeRegexp @page.name}}\]\]/ where done = false render [[template/tasks/task]] task where name =~ /\[\[{{escapeRegexp @page.name}}\]\]/ where done = false render [[template/task]]
``` ```