pub(crate) trait WorkerGlobalScopeMethods<D: DomTypes> {
Show 20 methods
// Required methods
fn Self_(&self) -> DomRoot<D::WorkerGlobalScope>;
fn Location(&self) -> DomRoot<D::WorkerLocation>;
fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull<D>>>;
fn SetOnerror(&self, value: Option<Rc<OnErrorEventHandlerNonNull<D>>>);
fn ImportScripts(
&self,
urls: Vec<DOMString>,
_can_gc: CanGc,
) -> Fallible<()>;
fn Navigator(&self) -> DomRoot<D::WorkerNavigator>;
fn Origin(&self) -> USVString;
fn Btoa(&self, data: DOMString) -> Fallible<DOMString>;
fn Atob(&self, data: DOMString) -> Fallible<DOMString>;
fn SetTimeout(
&self,
cx: SafeJSContext,
handler: StringOrFunction<D>,
timeout: i32,
arguments: Vec<HandleValue<'_>>,
) -> i32;
fn ClearTimeout(&self, handle: i32);
fn SetInterval(
&self,
cx: SafeJSContext,
handler: StringOrFunction<D>,
timeout: i32,
arguments: Vec<HandleValue<'_>>,
) -> i32;
fn ClearInterval(&self, handle: i32);
fn QueueMicrotask(&self, callback: Rc<VoidFunction<D>>);
fn CreateImageBitmap(
&self,
image: HTMLImageElementOrHTMLCanvasElementOrOffscreenCanvasOrCSSStyleValueOrBlobOrImageData<D>,
options: &ImageBitmapOptions,
_can_gc: CanGc,
) -> Rc<D::Promise>;
fn StructuredClone(
&self,
cx: SafeJSContext,
value: HandleValue<'_>,
options: RootedTraceableBox<StructuredSerializeOptions>,
rval: MutableHandleValue<'_>,
) -> Fallible<()>;
fn Crypto(&self) -> DomRoot<D::Crypto>;
fn Performance(&self) -> DomRoot<D::Performance>;
fn IsSecureContext(&self) -> bool;
fn Fetch(
&self,
input: RequestOrUSVString<D>,
init: RootedTraceableBox<RequestInit<D>>,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<D::Promise>;
}