Skip to main content

NotificationMethods

pub trait NotificationMethods<D: DomTypes> {
Show 28 methods // Required methods fn GetPermission( global: &D::GlobalScope, ) -> Fallible<NotificationPermission>; fn RequestPermission( cx: &mut JSContext, global: &D::GlobalScope, deprecatedCallback: Option<Rc<NotificationPermissionCallback<D>>>, ) -> Rc<D::Promise>; fn MaxActions(global: &D::GlobalScope) -> u32; fn GetOnclick( &self, cx: &mut JSContext, ) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnclick( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, ); fn GetOnshow( &self, cx: &mut JSContext, ) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnshow( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, ); fn GetOnerror( &self, cx: &mut JSContext, ) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnerror( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, ); fn GetOnclose( &self, cx: &mut JSContext, ) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnclose( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, ); fn Title(&self) -> DOMString; fn Dir(&self) -> NotificationDirection; fn Lang(&self) -> DOMString; fn Body(&self) -> DOMString; fn Tag(&self) -> DOMString; fn Image(&self) -> USVString; fn Icon(&self) -> USVString; fn Badge(&self) -> USVString; fn Renotify(&self) -> bool; fn RequireInteraction(&self) -> bool; fn GetSilent(&self) -> Option<bool>; fn Vibrate(&self, cx: &mut JSContext, retval: MutableHandleValue<'_>); fn Timestamp(&self) -> u64; fn Data(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>); fn Actions(&self, cx: &mut JSContext, retval: MutableHandleValue<'_>); fn Close(&self); fn Constructor( cx: &mut JSContext, global: &D::GlobalScope, proto: Option<HandleObject<'_>>, title: DOMString, options: RootedTraceableBox<NotificationOptions>, ) -> Fallible<DomRoot<D::Notification>>;
}

Required Methods§

Source

fn GetPermission(global: &D::GlobalScope) -> Fallible<NotificationPermission>

Source

fn RequestPermission( cx: &mut JSContext, global: &D::GlobalScope, deprecatedCallback: Option<Rc<NotificationPermissionCallback<D>>>, ) -> Rc<D::Promise>

Source

fn MaxActions(global: &D::GlobalScope) -> u32

Source

fn GetOnclick(&self, cx: &mut JSContext) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnclick( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, )

Source

fn GetOnshow(&self, cx: &mut JSContext) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnshow( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, )

Source

fn GetOnerror(&self, cx: &mut JSContext) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnerror( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, )

Source

fn GetOnclose(&self, cx: &mut JSContext) -> Option<Rc<EventHandlerNonNull<D>>>

Source

fn SetOnclose( &self, cx: &mut JSContext, value: Option<Rc<EventHandlerNonNull<D>>>, )

Source

fn Title(&self) -> DOMString

Source

fn Dir(&self) -> NotificationDirection

Source

fn Lang(&self) -> DOMString

Source

fn Body(&self) -> DOMString

Source

fn Tag(&self) -> DOMString

Source

fn Image(&self) -> USVString

Source

fn Icon(&self) -> USVString

Source

fn Badge(&self) -> USVString

Source

fn Renotify(&self) -> bool

Source

fn RequireInteraction(&self) -> bool

Source

fn GetSilent(&self) -> Option<bool>

Source

fn Vibrate(&self, cx: &mut JSContext, retval: MutableHandleValue<'_>)

Source

fn Timestamp(&self) -> u64

Source

fn Data(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>)

Source

fn Actions(&self, cx: &mut JSContext, retval: MutableHandleValue<'_>)

Source

fn Close(&self)

Source

fn Constructor( cx: &mut JSContext, global: &D::GlobalScope, proto: Option<HandleObject<'_>>, title: DOMString, options: RootedTraceableBox<NotificationOptions>, ) -> Fallible<DomRoot<D::Notification>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§