ICoreWebView2Frame4

Undocumented in source.

Members

Functions

PostSharedBufferToScript
HRESULT PostSharedBufferToScript(ICoreWebView2SharedBuffer sharedBuffer, COREWEBVIEW2_SHARED_BUFFER_ACCESS access, LPCWSTR additionalDataAsJson)

Share a shared buffer object with script of the iframe in the WebView. The script will receive a sharedbufferreceived event from chrome.webview. The event arg for that event will have the following methods and properties: getBuffer(): return an ArrayBuffer object with the backing content from the shared buffer. additionalData: an object as the result of parsing additionalDataAsJson as JSON string. This property will be undefined if additionalDataAsJson is nullptr or empty string. source: with a value set as chrome.webview object. If a string is provided as additionalDataAsJson but it is not a valid JSON string, the API will fail with E_INVALIDARG. If access is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer. If the script tries to modify the content in a read only buffer, it will cause an access violation in WebView renderer process and crash the renderer process. If the shared buffer is already closed, the API will fail with RO_E_CLOSED.

Inherited Members

From ICoreWebView2Frame3

add_PermissionRequested
HRESULT add_PermissionRequested(ICoreWebView2FramePermissionRequestedEventHandler handler, EventRegistrationToken* token)

Add an event handler for the PermissionRequested event. PermissionRequested is raised when content in an iframe any of its descendant iframes requests permission to privileged resources.

remove_PermissionRequested
HRESULT remove_PermissionRequested(EventRegistrationToken token)

Remove an event handler previously added with add_PermissionRequested

Meta