diff options
Diffstat (limited to 'vendor/web-sys/src/features/gen_NotificationOptions.rs')
-rw-r--r-- | vendor/web-sys/src/features/gen_NotificationOptions.rs | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/vendor/web-sys/src/features/gen_NotificationOptions.rs b/vendor/web-sys/src/features/gen_NotificationOptions.rs index 31d504db7..ec01ac68a 100644 --- a/vendor/web-sys/src/features/gen_NotificationOptions.rs +++ b/vendor/web-sys/src/features/gen_NotificationOptions.rs @@ -20,6 +20,36 @@ impl NotificationOptions { let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } + #[doc = "Change the `actions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + pub fn actions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("actions"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `badge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + pub fn badge(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("badge"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } #[doc = "Change the `body` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] @@ -73,6 +103,19 @@ impl NotificationOptions { let _ = r; self } + #[doc = "Change the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + pub fn image(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("image"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } #[doc = "Change the `lang` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] @@ -86,6 +129,23 @@ impl NotificationOptions { let _ = r; self } + #[doc = "Change the `renotify` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + pub fn renotify(&mut self, val: bool) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("renotify"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } #[doc = "Change the `requireInteraction` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] @@ -103,6 +163,20 @@ impl NotificationOptions { let _ = r; self } + #[doc = "Change the `silent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + pub fn silent(&mut self, val: Option<bool>) -> &mut Self { + use wasm_bindgen::JsValue; + let r = + ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("silent"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } #[doc = "Change the `tag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] @@ -116,6 +190,23 @@ impl NotificationOptions { let _ = r; self } + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + pub fn timestamp(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("timestamp"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } } impl Default for NotificationOptions { fn default() -> Self { |