CoreWebView2SharedWorker Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a shared worker in WebView2 and provides methods and properties for interacting with it, such as listening to destroying events, getting the script URI, origin, and top-level origin of the worker, etc.
public class CoreWebView2SharedWorker
type CoreWebView2SharedWorker = class
Public Class CoreWebView2SharedWorker
- Inheritance
-
CoreWebView2SharedWorker
Properties
| Name | Description |
|---|---|
| Origin |
A string representing the URI of the origin where the worker is executing. If a worker is created with Refer to the Host Name Canonicalization for details on how normalization is performed. |
| ScriptUri |
A string representing the Uri of the script that the worker is executing. The Refer to the Host Name Canonicalization for
details on how normalization is performed.
The same process applies to the script URL when a worker is created from DOM API.
The |
| TopLevelOrigin |
A string representing the URI of the top-level document that the worker is associated with. If a worker is created with Refer to the Host Name Canonicalization section for details on how normalization is performed. When CustomDataPartitionId is set, the For more details, see CustomDataPartitionId. |
Events
| Name | Description |
|---|---|
| Destroying |
Raised when the worker object is being destroyed. A worker object is being destroyed when the worker script is terminated or when the CoreWebView2SharedWorker object is being destroyed. If the worker has already been destroyed before the event handler is registered, the handler will never be called. |