CoreWebView2ServiceWorkerRegistration.TopLevelOrigin Property
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.
A string representing the URI of the top-level document that the worker is associated with.
If a worker is created with `ScriptUri` set to https://example.com/worker.js, the top-level origin
is https://example.com/. If the same worker is created from a iframe at https://example.com/ which is hosted on
https://example2.com/, the top-level origin is https://example2.com/.
Refer to the Host Name Canonicalization for
details on how normalization is performed.
When CustomDataPartitionId is set, the `TopLevelOrigin` will be a generated
site like guid.invalid. For example, if the top-level document is https://example.com/worker.js,
the top-level origin will be `https://guid.invalid/`.
For more details <xref data-throw-if-not-resolved="true" uid="Microsoft.Web.WebView2.Core.CoreWebView2.CustomDataPartitionId"></xref>
public string TopLevelOrigin { get; }
member this.TopLevelOrigin : string
Public ReadOnly Property TopLevelOrigin As String