Skip to main content

web_sys/features/
gen_HtmlDialogElement.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "HtmlElement",
9        extends = "Element",
10        extends = "Node",
11        extends = "EventTarget",
12        extends = "::js_sys::Object",
13        js_name = "HTMLDialogElement",
14        typescript_type = "HTMLDialogElement"
15    )]
16    #[derive(Debug, Clone, PartialEq, Eq)]
17    #[doc = "The `HtmlDialogElement` class."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
22    pub type HtmlDialogElement;
23    #[wasm_bindgen(method, getter, js_class = "HTMLDialogElement", js_name = "open")]
24    #[doc = "Getter for the `open` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/open)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
29    pub fn open(this: &HtmlDialogElement) -> bool;
30    #[wasm_bindgen(method, setter, js_class = "HTMLDialogElement", js_name = "open")]
31    #[doc = "Setter for the `open` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/open)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
36    pub fn set_open(this: &HtmlDialogElement, value: bool);
37    #[wasm_bindgen(
38        method,
39        getter,
40        js_class = "HTMLDialogElement",
41        js_name = "returnValue"
42    )]
43    #[doc = "Getter for the `returnValue` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
48    pub fn return_value(this: &HtmlDialogElement) -> ::alloc::string::String;
49    #[wasm_bindgen(
50        method,
51        setter,
52        js_class = "HTMLDialogElement",
53        js_name = "returnValue"
54    )]
55    #[doc = "Setter for the `returnValue` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
60    pub fn set_return_value(this: &HtmlDialogElement, value: &str);
61    #[wasm_bindgen(method, js_class = "HTMLDialogElement")]
62    #[doc = "The `close()` method."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
67    pub fn close(this: &HtmlDialogElement);
68    #[wasm_bindgen(method, js_class = "HTMLDialogElement", js_name = "close")]
69    #[doc = "The `close()` method."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
74    pub fn close_with_return_value(this: &HtmlDialogElement, return_value: &str);
75    #[wasm_bindgen(method, js_class = "HTMLDialogElement")]
76    #[doc = "The `show()` method."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/show)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
81    pub fn show(this: &HtmlDialogElement);
82    #[wasm_bindgen(catch, method, js_class = "HTMLDialogElement", js_name = "showModal")]
83    #[doc = "The `showModal()` method."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `HtmlDialogElement`*"]
88    pub fn show_modal(this: &HtmlDialogElement) -> Result<(), JsValue>;
89}