Expand description
Cocoon → Mountain webview.setTitle / webview.setIconPath /
webview.setHtml / webview.postMessage / webview.updateView /
webview.viewState / webview.dispose notifications. Shared atom
because the methods all map to the same suffix-split pattern; keeping
them in one file avoids near-identical 5-line files while still
pinning the handler to a discoverable filename.
Wire-shape canonicalisation MIRRORS Track/Effect/CreateEffectForRequest/ Webview.rs so notification-path payloads land on the same named-key
shapes as the request path. SkyBridge’s listeners read Payload.viewId,
Payload.html, Payload.message etc. directly; without this Cocoon’s
legacy positional [Handle, Value] notifications would emit a payload
whose only top-level keys are 0/1 (array indices), the listener
would early-return on the missing named keys, and the iframe would
stay blank even when the request path canonicalised correctly.
For per-extension isolation and payload inspection, split this into
per-method atoms (WebviewSetTitle, WebviewSetIconPath, etc.) when
the divergence is worth it.