diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/web-sys/src/features/gen_NotificationOptions.rs | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 { |