-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated Notification APIs * Updated Notification APIs * Update crates/web-sys/webidls/enabled/Notification.webidl Co-authored-by: daxpedda <[email protected]> * Update crates/web-sys/webidls/enabled/Notification.webidl Co-authored-by: daxpedda <[email protected]> * added entries to changelog * regenerated * Update CHANGELOG.md with new additions * Update CHANGELOG.md Co-authored-by: daxpedda <[email protected]> --------- Co-authored-by: daxpedda <[email protected]>
- Loading branch information
Showing
10 changed files
with
251 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#![allow(unused_imports)] | ||
#![allow(clippy::all)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = NotificationAction)] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `NotificationAction` dictionary."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] | ||
pub type NotificationAction; | ||
} | ||
impl NotificationAction { | ||
#[doc = "Construct a new `NotificationAction`."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] | ||
pub fn new(action: &str, title: &str) -> Self { | ||
#[allow(unused_mut)] | ||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); | ||
ret.action(action); | ||
ret.title(title); | ||
ret | ||
} | ||
#[doc = "Change the `action` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] | ||
pub fn action(&mut self, val: &str) -> &mut Self { | ||
use wasm_bindgen::JsValue; | ||
let r = | ||
::js_sys::Reflect::set(self.as_ref(), &JsValue::from("action"), &JsValue::from(val)); | ||
debug_assert!( | ||
r.is_ok(), | ||
"setting properties should never fail on our dictionary objects" | ||
); | ||
let _ = r; | ||
self | ||
} | ||
#[doc = "Change the `icon` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] | ||
pub fn icon(&mut self, val: &str) -> &mut Self { | ||
use wasm_bindgen::JsValue; | ||
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("icon"), &JsValue::from(val)); | ||
debug_assert!( | ||
r.is_ok(), | ||
"setting properties should never fail on our dictionary objects" | ||
); | ||
let _ = r; | ||
self | ||
} | ||
#[doc = "Change the `title` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] | ||
pub fn title(&mut self, val: &str) -> &mut Self { | ||
use wasm_bindgen::JsValue; | ||
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("title"), &JsValue::from(val)); | ||
debug_assert!( | ||
r.is_ok(), | ||
"setting properties should never fail on our dictionary objects" | ||
); | ||
let _ = r; | ||
self | ||
} | ||
} |
113 changes: 0 additions & 113 deletions
113
crates/web-sys/src/features/gen_NotificationBehavior.rs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.