-
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.
Add WebIDL definitions relating to
Popover API
.
- Loading branch information
1 parent
6536e60
commit da2601d
Showing
17 changed files
with
341 additions
and
0 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 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 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 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,47 @@ | ||
#![allow(unused_imports)] | ||
#![allow(clippy::all)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = ToggleEvent , typescript_type = "ToggleEvent")] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `ToggleEvent` class."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEvent`*"] | ||
pub type ToggleEvent; | ||
# [wasm_bindgen (structural , method , getter , js_class = "ToggleEvent" , js_name = oldState)] | ||
#[doc = "Getter for the `oldState` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEvent`*"] | ||
pub fn old_state(this: &ToggleEvent) -> String; | ||
# [wasm_bindgen (structural , method , getter , js_class = "ToggleEvent" , js_name = newState)] | ||
#[doc = "Getter for the `newState` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEvent`*"] | ||
pub fn new_state(this: &ToggleEvent) -> String; | ||
#[wasm_bindgen(catch, constructor, js_class = "ToggleEvent")] | ||
#[doc = "The `new ToggleEvent(..)` constructor, creating a new instance of `ToggleEvent`."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/ToggleEvent)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEvent`*"] | ||
pub fn new(type_: &str) -> Result<ToggleEvent, JsValue>; | ||
#[cfg(feature = "ToggleEventInit")] | ||
#[wasm_bindgen(catch, constructor, js_class = "ToggleEvent")] | ||
#[doc = "The `new ToggleEvent(..)` constructor, creating a new instance of `ToggleEvent`."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/ToggleEvent)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEvent`, `ToggleEventInit`*"] | ||
pub fn new_with_event_init_dict( | ||
type_: &str, | ||
event_init_dict: &ToggleEventInit, | ||
) -> Result<ToggleEvent, JsValue>; | ||
} |
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,73 @@ | ||
#![allow(unused_imports)] | ||
#![allow(clippy::all)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = ToggleEventInit)] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `ToggleEventInit` dictionary."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub type ToggleEventInit; | ||
#[wasm_bindgen(method, setter = "bubbles")] | ||
fn bubbles_shim(this: &ToggleEventInit, val: bool); | ||
#[wasm_bindgen(method, setter = "cancelable")] | ||
fn cancelable_shim(this: &ToggleEventInit, val: bool); | ||
#[wasm_bindgen(method, setter = "composed")] | ||
fn composed_shim(this: &ToggleEventInit, val: bool); | ||
#[wasm_bindgen(method, setter = "newState")] | ||
fn new_state_shim(this: &ToggleEventInit, val: &str); | ||
#[wasm_bindgen(method, setter = "oldState")] | ||
fn old_state_shim(this: &ToggleEventInit, val: &str); | ||
} | ||
impl ToggleEventInit { | ||
#[doc = "Construct a new `ToggleEventInit`."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub fn new() -> Self { | ||
#[allow(unused_mut)] | ||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); | ||
ret | ||
} | ||
#[doc = "Change the `bubbles` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub fn bubbles(&mut self, val: bool) -> &mut Self { | ||
self.bubbles_shim(val); | ||
self | ||
} | ||
#[doc = "Change the `cancelable` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub fn cancelable(&mut self, val: bool) -> &mut Self { | ||
self.cancelable_shim(val); | ||
self | ||
} | ||
#[doc = "Change the `composed` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub fn composed(&mut self, val: bool) -> &mut Self { | ||
self.composed_shim(val); | ||
self | ||
} | ||
#[doc = "Change the `newState` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub fn new_state(&mut self, val: &str) -> &mut Self { | ||
self.new_state_shim(val); | ||
self | ||
} | ||
#[doc = "Change the `oldState` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `ToggleEventInit`*"] | ||
pub fn old_state(&mut self, val: &str) -> &mut Self { | ||
self.old_state_shim(val); | ||
self | ||
} | ||
} | ||
impl Default for ToggleEventInit { | ||
fn default() -> Self { | ||
Self::new() | ||
} | ||
} |
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
Oops, something went wrong.