ICoreWebView2_17

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 main frame 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 ICoreWebView2_16

Print
HRESULT Print(ICoreWebView2PrintSettings printSettings, ICoreWebView2PrintCompletedHandler handler)

Print the current web page asynchronously to the specified printer with the provided settings. See ICoreWebView2PrintSettings for description of settings. Passing nullptr for printSettings results in default print settings used.

ShowPrintUI
HRESULT ShowPrintUI(COREWEBVIEW2_PRINT_DIALOG_KIND printDialogKind)

Opens the print dialog to print the current web page. See COREWEBVIEW2_PRINT_DIALOG_KIND for descriptions of print dialog kinds.

PrintToPdfStream
HRESULT PrintToPdfStream(ICoreWebView2PrintSettings printSettings, ICoreWebView2PrintToPdfStreamCompletedHandler handler)

Provides the Pdf data of current web page asynchronously for the provided settings. Stream will be rewound to the start of the pdf data.

Meta