Web View
my.createWebViewContext
Create a context to control a web-view component.
Create a WebViewContext for communicating with web-view components.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a context to control a web-view component.
| Property | Type | Required | Description |
|---|---|---|---|
| webviewId | String | Yes | ID of the web-view component |
| Method | Description |
|---|---|
| postMessage(data) | Send a message to the web-view |
const webViewContext = my.createWebViewContext('myWebView');
webViewContext.postMessage({
action: 'refresh',
data: { userId: '123' }
});
<web-view id="myWebView" src="https://example.com" onMessage="onWebViewMessage" />