pub(crate) trait NotificationMethods<D: DomTypes> {
Show 28 methods
// Required methods
fn GetPermission(
global: &D::GlobalScope,
) -> Fallible<NotificationPermission>;
fn RequestPermission(
global: &D::GlobalScope,
deprecatedCallback: Option<Rc<NotificationPermissionCallback<D>>>,
_can_gc: CanGc,
) -> Rc<D::Promise>;
fn MaxActions(global: &D::GlobalScope) -> u32;
fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnclick(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnshow(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>);
fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull<D>>>;
fn SetOnclose(&self, 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: SafeJSContext,
_can_gc: CanGc,
retval: MutableHandleValue<'_>,
);
fn Timestamp(&self) -> u64;
fn Data(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>);
fn Actions(
&self,
cx: SafeJSContext,
_can_gc: CanGc,
retval: MutableHandleValue<'_>,
);
fn Close(&self);
fn Constructor(
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
title: DOMString,
options: RootedTraceableBox<NotificationOptions>,
) -> Fallible<DomRoot<D::Notification>>;
}
Required Methods§
fn GetPermission(global: &D::GlobalScope) -> Fallible<NotificationPermission>
fn RequestPermission( global: &D::GlobalScope, deprecatedCallback: Option<Rc<NotificationPermissionCallback<D>>>, _can_gc: CanGc, ) -> Rc<D::Promise>
fn MaxActions(global: &D::GlobalScope) -> u32
fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnclick(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnshow(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>)
fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull<D>>>
fn SetOnclose(&self, 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: SafeJSContext, _can_gc: CanGc, retval: MutableHandleValue<'_>, )
fn Timestamp(&self) -> u64
fn Data(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>)
fn Actions( &self, cx: SafeJSContext, _can_gc: CanGc, retval: MutableHandleValue<'_>, )
fn Close(&self)
fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, 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.