maxcountryman_web_sys/features/
gen_NotificationEvent.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = ExtendableEvent , extends = Event , extends = :: js_sys :: Object , js_name = NotificationEvent , typescript_type = "NotificationEvent")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `NotificationEvent` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `NotificationEvent`*"]
13 pub type NotificationEvent;
14 #[cfg(feature = "Notification")]
15 # [wasm_bindgen (structural , method , getter , js_class = "NotificationEvent" , js_name = notification)]
16 #[doc = "Getter for the `notification` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent/notification)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEvent`*"]
21 pub fn notification(this: &NotificationEvent) -> Notification;
22 #[cfg(feature = "NotificationEventInit")]
23 #[wasm_bindgen(catch, constructor, js_class = "NotificationEvent")]
24 #[doc = "The `new NotificationEvent(..)` constructor, creating a new instance of `NotificationEvent`."]
25 #[doc = ""]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NotificationEvent/NotificationEvent)"]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `NotificationEvent`, `NotificationEventInit`*"]
29 pub fn new(
30 type_: &str,
31 event_init_dict: &NotificationEventInit,
32 ) -> Result<NotificationEvent, JsValue>;
33}