WorkerGlobalScopeMethods

Trait WorkerGlobalScopeMethods 

Source
pub(crate) trait WorkerGlobalScopeMethods<D>
where D: DomTypes,
{
Show 33 methods // Required methods fn Self_(&self) -> Root<Dom<<D as DomTypes>::WorkerGlobalScope>>; fn Location(&self) -> Root<Dom<<D as DomTypes>::WorkerLocation>>; fn Navigator(&self) -> Root<Dom<<D as DomTypes>::WorkerNavigator>>; fn ImportScripts( &self, urls: Vec<TrustedScriptURLOrUSVString<D>>, _can_gc: CanGc, ) -> Result<(), Error>; fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull<D>>>; fn SetOnerror(&self, value: Option<Rc<OnErrorEventHandlerNonNull<D>>>); fn GetOnlanguagechange(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnlanguagechange(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnoffline(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnoffline(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnonline(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnonline(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnrejectionhandled(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnrejectionhandled(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnunhandledrejection(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnunhandledrejection(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn Origin(&self) -> USVString; fn Btoa(&self, data: DOMString) -> Result<DOMString, Error>; fn Atob(&self, data: DOMString) -> Result<DOMString, Error>; fn SetTimeout( &self, cx: JSContext, handler: TrustedScriptOrStringOrFunction<D>, timeout: i32, arguments: Vec<Handle<'_, Value>>, _can_gc: CanGc, ) -> Result<i32, Error>; fn ClearTimeout(&self, handle: i32); fn SetInterval( &self, cx: JSContext, handler: TrustedScriptOrStringOrFunction<D>, timeout: i32, arguments: Vec<Handle<'_, Value>>, _can_gc: CanGc, ) -> Result<i32, Error>; fn ClearInterval(&self, handle: i32); fn QueueMicrotask(&self, callback: Rc<VoidFunction<D>>); fn CreateImageBitmap( &self, image: HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvasOrCSSStyleValueOrBlobOrImageData<D>, options: &ImageBitmapOptions, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>; fn CreateImageBitmap_( &self, image: HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvasOrCSSStyleValueOrBlobOrImageData<D>, sx: i32, sy: i32, sw: i32, sh: i32, options: &ImageBitmapOptions, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>; fn StructuredClone( &self, cx: JSContext, value: Handle<'_, Value>, options: RootedTraceableBox<StructuredSerializeOptions>, _can_gc: CanGc, rval: MutableHandle<'_, Value>, ) -> Result<(), Error>; fn Crypto(&self) -> Root<Dom<<D as DomTypes>::Crypto>>; fn Performance(&self) -> Root<Dom<<D as DomTypes>::Performance>>; fn IsSecureContext(&self) -> bool; fn TrustedTypes( &self, _can_gc: CanGc, ) -> Root<Dom<<D as DomTypes>::TrustedTypePolicyFactory>>; fn Fetch( &self, input: RequestOrUSVString<D>, init: RootedTraceableBox<RequestInit<D>>, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>; fn IndexedDB(&self) -> Root<Dom<<D as DomTypes>::IDBFactory>>;
}

Required Methods§

Source

fn Self_(&self) -> Root<Dom<<D as DomTypes>::WorkerGlobalScope>>

Source

fn Location(&self) -> Root<Dom<<D as DomTypes>::WorkerLocation>>

Source

fn Navigator(&self) -> Root<Dom<<D as DomTypes>::WorkerNavigator>>

Source

fn ImportScripts( &self, urls: Vec<TrustedScriptURLOrUSVString<D>>, _can_gc: CanGc, ) -> Result<(), Error>

Source

fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull<D>>>

Source

fn SetOnerror(&self, value: Option<Rc<OnErrorEventHandlerNonNull<D>>>)

Source

fn GetOnlanguagechange(&self) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnlanguagechange(&self, value: Option<Rc<EventHandlerNonNull<D>>>)

Source

fn GetOnoffline(&self) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnoffline(&self, value: Option<Rc<EventHandlerNonNull<D>>>)

Source

fn GetOnonline(&self) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnonline(&self, value: Option<Rc<EventHandlerNonNull<D>>>)

Source

fn GetOnrejectionhandled(&self) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnrejectionhandled(&self, value: Option<Rc<EventHandlerNonNull<D>>>)

Source

fn GetOnunhandledrejection(&self) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnunhandledrejection(&self, value: Option<Rc<EventHandlerNonNull<D>>>)

Source

fn Origin(&self) -> USVString

Source

fn Btoa(&self, data: DOMString) -> Result<DOMString, Error>

Source

fn Atob(&self, data: DOMString) -> Result<DOMString, Error>

Source

fn SetTimeout( &self, cx: JSContext, handler: TrustedScriptOrStringOrFunction<D>, timeout: i32, arguments: Vec<Handle<'_, Value>>, _can_gc: CanGc, ) -> Result<i32, Error>

Source

fn ClearTimeout(&self, handle: i32)

Source

fn SetInterval( &self, cx: JSContext, handler: TrustedScriptOrStringOrFunction<D>, timeout: i32, arguments: Vec<Handle<'_, Value>>, _can_gc: CanGc, ) -> Result<i32, Error>

Source

fn ClearInterval(&self, handle: i32)

Source

fn QueueMicrotask(&self, callback: Rc<VoidFunction<D>>)

Source

fn CreateImageBitmap( &self, image: HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvasOrCSSStyleValueOrBlobOrImageData<D>, options: &ImageBitmapOptions, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>

Source

fn CreateImageBitmap_( &self, image: HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvasOrCSSStyleValueOrBlobOrImageData<D>, sx: i32, sy: i32, sw: i32, sh: i32, options: &ImageBitmapOptions, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>

Source

fn StructuredClone( &self, cx: JSContext, value: Handle<'_, Value>, options: RootedTraceableBox<StructuredSerializeOptions>, _can_gc: CanGc, rval: MutableHandle<'_, Value>, ) -> Result<(), Error>

Source

fn Crypto(&self) -> Root<Dom<<D as DomTypes>::Crypto>>

Source

fn Performance(&self) -> Root<Dom<<D as DomTypes>::Performance>>

Source

fn IsSecureContext(&self) -> bool

Source

fn TrustedTypes( &self, _can_gc: CanGc, ) -> Root<Dom<<D as DomTypes>::TrustedTypePolicyFactory>>

Source

fn Fetch( &self, input: RequestOrUSVString<D>, init: RootedTraceableBox<RequestInit<D>>, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<<D as DomTypes>::Promise>

Source

fn IndexedDB(&self) -> Root<Dom<<D as DomTypes>::IDBFactory>>

Implementors§