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