From 7a8819c296f37559f04723adb8ee92e7faabf44f Mon Sep 17 00:00:00 2001 From: Helen Kwok <107752876+helenkwok@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:05:24 +1030 Subject: [PATCH 1/5] Contributors: credit helenkwok as Helen Kwok --- contributors/people.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contributors/people.toml b/contributors/people.toml index 950a26a2b5..a048cd0a1d 100644 --- a/contributors/people.toml +++ b/contributors/people.toml @@ -192,3 +192,6 @@ sync_github_name = true [people.entropybeater] display_name = "entropybeater" + +[people.helenkwok] +real_name = "Helen Kwok" From 5f9bb3f1112d2397ff8073fc30cda997e7e3c4b3 Mon Sep 17 00:00:00 2001 From: Helen Kwok <107752876+helenkwok@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:05:43 +1030 Subject: [PATCH 2/5] feat(web): page host mode, so a page can host WordCraft in its own document (#4366) data-host="page" on the canvas opts a page that loads the module into its own document into the host bridge. The ?host=parent messages travel as non-bubbling CustomEvents on the canvas; the bridge holds a Transport (Parent or Page) with one send, and the open, save, dirty, ready and failure handling is shared. ?host=parent is checked first and unchanged, including no bridge for an unframed page. The hosting guide documents both modes. --- apps/wordcraft-web/Cargo.toml | 2 +- apps/wordcraft-web/src/host.rs | 186 +++++++++++++++++++++-------- apps/wordcraft-web/src/hostmode.rs | 22 ++++ apps/wordcraft-web/src/main.rs | 8 +- apps/wordcraft-web/src/web.rs | 15 ++- packaging/web/README.md | 76 ++++++++++++ 6 files changed, 253 insertions(+), 56 deletions(-) create mode 100644 apps/wordcraft-web/src/hostmode.rs diff --git a/apps/wordcraft-web/Cargo.toml b/apps/wordcraft-web/Cargo.toml index 4a2a9d014e..1d6d8cc344 100644 --- a/apps/wordcraft-web/Cargo.toml +++ b/apps/wordcraft-web/Cargo.toml @@ -29,4 +29,4 @@ rfd = { workspace = true } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" js-sys = "0.3" -web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlElement", "HtmlCanvasElement", "HtmlAnchorElement", "HtmlIFrameElement", "Blob", "BlobPropertyBag", "Url", "Location", "CssStyleDeclaration", "Event", "EventTarget", "BeforeUnloadEvent", "ClipboardEvent", "DataTransfer", "FileList", "File", "DomStringList", "IdbFactory", "IdbOpenDbRequest", "IdbRequest", "IdbDatabase", "IdbObjectStore", "IdbTransaction", "IdbTransactionMode", "MediaQueryList", "Storage", "MessageEvent", "UrlSearchParams"] } +web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlElement", "HtmlCanvasElement", "HtmlAnchorElement", "HtmlIFrameElement", "Blob", "BlobPropertyBag", "Url", "Location", "CssStyleDeclaration", "Event", "EventTarget", "BeforeUnloadEvent", "ClipboardEvent", "DataTransfer", "FileList", "File", "DomStringList", "IdbFactory", "IdbOpenDbRequest", "IdbRequest", "IdbDatabase", "IdbObjectStore", "IdbTransaction", "IdbTransactionMode", "MediaQueryList", "Storage", "MessageEvent", "UrlSearchParams", "CustomEvent", "CustomEventInit"] } diff --git a/apps/wordcraft-web/src/host.rs b/apps/wordcraft-web/src/host.rs index 9307e0ed15..2f0fab64b1 100644 --- a/apps/wordcraft-web/src/host.rs +++ b/apps/wordcraft-web/src/host.rs @@ -1,6 +1,11 @@ -//! The `postMessage` bridge to a same-origin parent page (`?host=parent`), for pages that embed -//! WordCraft in an `