Share via


interface ICoreWebView2ExperimentalFrame9

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalFrame9
  : public IUnknown

A continuation of the ICoreWebView2Frame interface to manage dedicated workers.

Summary

Members Descriptions
add_DedicatedWorkerCreated Adds an event handler for the DedicatedWorkerCreated event.
remove_DedicatedWorkerCreated Removes an event handler previously added with add_DedicatedWorkerCreated.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease

Members

add_DedicatedWorkerCreated

Adds an event handler for the DedicatedWorkerCreated event.

public HRESULT add_DedicatedWorkerCreated(ICoreWebView2ExperimentalFrameDedicatedWorkerCreatedEventHandler * eventHandler, EventRegistrationToken * token)

Subscribe to this event that gets raised when a new dedicated worker is created from an iframe.

A Dedicated Worker is a type of web worker that allow you to run Javascript code in the background without blocking the main thread, making them useful for tasks like heavy computations, data processing, and parallel execution. It is "dedicated" because it is linked to a single parent document and cannot be shared with other scripts.

This event is raised when a web application creates a dedicated worker using the new Worker("/worker.js") method. See the Worker for more information.

remove_DedicatedWorkerCreated

Removes an event handler previously added with add_DedicatedWorkerCreated.

public HRESULT remove_DedicatedWorkerCreated(EventRegistrationToken token)