WorkletGlobalScope Class

The global object of a worklet (https://html.spec.whatwg.org/multipage/worklets.html#workletglobalscope), e.g. a PaintWorkletGlobalScope: the module scripts of its WorkletGlobalScope.Worklet run in its realm, which only exposes the interfaces of its kind (no DOM, no timers, no network access).

public abstract class WorkletGlobalScope : GlobalScope

Remarks

The realm of a worklet global scope belongs to the script engine of the document of the worklet: its scripts and its callbacks run on the thread of the event loop of the document.

See also

Inheritance
GlobalScope WorkletGlobalScope

Properties

NameDescription
CrossOriginIsolatedhttps://html.spec.whatwg.org/multipage/webappapis.html#dom-crossoriginisolated
IsSecureContexthttps://html.spec.whatwg.org/multipage/webappapis.html#dom-issecurecontext
Originhttps://html.spec.whatwg.org/multipage/webappapis.html#dom-origin

CrossOriginIsolated

WorkletGlobalScope.cs

https://html.spec.whatwg.org/multipage/webappapis.html#dom-crossoriginisolated

public override bool CrossOriginIsolated { get; }

Property value

bool

Remarks

https://html.spec.whatwg.org/multipage/worklets.html#set-up-a-worklet-environment-settings-object: the cross-origin isolated capability is the one of the document (e.g. a SharedArrayBuffer can be shared with the audio worklet of a cross-origin isolated document).

See also

IsSecureContext

WorkletGlobalScope.cs

https://html.spec.whatwg.org/multipage/webappapis.html#dom-issecurecontext

public override bool IsSecureContext { get; }

https://html.spec.whatwg.org/multipage/webappapis.html#dom-origin

public override string Origin { get; }