Live Widget Creation
Capability-gated handoff from the embedded Today feed to the native creation flow.
live_widget_creation.v1 lets an embedded Today feed ask its native host to
present the host-owned Live Widget creation flow. Web announces intent only;
native owns the sheet, its navigation, creation state, and completion behavior.
Capability and wire shape
The host advertises live_widget_creation.v1 in
window.__todayWebView.capabilities only after it can handle this request:
type LiveWidgetCreationPresentRequest = {
type: 'liveWidgetCreation.present'
schemaVersion: 1
}
interface LiveWidgetCreationPresentationResult {
presented: boolean
}| Direction | web → native |
| Request | { type: 'liveWidgetCreation.present', schemaVersion: 1 } |
| Result | { presented: boolean } |
| Awaited by web | Yes |
| May reject | Only for a malformed request or transport failure |
The request intentionally carries no prompt, user data, widget definition, or presentation configuration. Those belong to the native product flow and MUST NOT be inferred from page content.
Host behavior
- The host MUST serve the request only to the main frame of a trusted,
first-party embedded Today surface. An untrusted frame or URL resolves
undefined. - The host MUST validate
schemaVersion === 1before presenting UI. - The host MUST resolve
{ presented: true }only after it accepts the request and initiates presentation of the creation flow. - If the WebView is offscreen, the host has another modal active, or no presenter
is available, the host MUST resolve
{ presented: false }. It MUST NOT queue the request or replace existing UI. presentedis an immediate presentation acknowledgement. It does not mean that a widget was created, and the host MUST NOT delay the reply until the creation flow completes.
Web behavior
- Web MUST require both an embedded surface and the explicit
live_widget_creation.v1capability before showing the Add affordance. - On Add, Web calls
presentLiveWidgetCreation()once. It MUST NOT also open a Web creation modal on the embedded surface. - With no capability, Web hides the Add affordance. It does not probe by presenting UI and does not fall back to browser navigation.
{ presented: false }leaves the feed unchanged. The next explicit user Add action may try again.
This capability is independent of native_dialog.v1: it opens a product-owned
creation flow rather than a generic alert or action sheet.