web_sys/features/
gen_DomRect.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = DomRectReadOnly , extends = :: js_sys :: Object , js_name = DOMRect , typescript_type = "DOMRect")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `DomRect` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
14    pub type DomRect;
15    # [wasm_bindgen (structural , method , getter , js_class = "DOMRect" , js_name = x)]
16    #[doc = "Getter for the `x` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/x)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
21    pub fn x(this: &DomRect) -> f64;
22    # [wasm_bindgen (structural , method , setter , js_class = "DOMRect" , js_name = x)]
23    #[doc = "Setter for the `x` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/x)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
28    pub fn set_x(this: &DomRect, value: f64);
29    # [wasm_bindgen (structural , method , getter , js_class = "DOMRect" , js_name = y)]
30    #[doc = "Getter for the `y` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/y)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
35    pub fn y(this: &DomRect) -> f64;
36    # [wasm_bindgen (structural , method , setter , js_class = "DOMRect" , js_name = y)]
37    #[doc = "Setter for the `y` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/y)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
42    pub fn set_y(this: &DomRect, value: f64);
43    # [wasm_bindgen (structural , method , getter , js_class = "DOMRect" , js_name = width)]
44    #[doc = "Getter for the `width` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/width)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
49    pub fn width(this: &DomRect) -> f64;
50    # [wasm_bindgen (structural , method , setter , js_class = "DOMRect" , js_name = width)]
51    #[doc = "Setter for the `width` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/width)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
56    pub fn set_width(this: &DomRect, value: f64);
57    # [wasm_bindgen (structural , method , getter , js_class = "DOMRect" , js_name = height)]
58    #[doc = "Getter for the `height` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/height)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
63    pub fn height(this: &DomRect) -> f64;
64    # [wasm_bindgen (structural , method , setter , js_class = "DOMRect" , js_name = height)]
65    #[doc = "Setter for the `height` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/height)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
70    pub fn set_height(this: &DomRect, value: f64);
71    #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
72    #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
77    pub fn new() -> Result<DomRect, JsValue>;
78    #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
79    #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
84    pub fn new_with_x(x: f64) -> Result<DomRect, JsValue>;
85    #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
86    #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
91    pub fn new_with_x_and_y(x: f64, y: f64) -> Result<DomRect, JsValue>;
92    #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
93    #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
98    pub fn new_with_x_and_y_and_width(x: f64, y: f64, width: f64) -> Result<DomRect, JsValue>;
99    #[wasm_bindgen(catch, constructor, js_class = "DOMRect")]
100    #[doc = "The `new DomRect(..)` constructor, creating a new instance of `DomRect`."]
101    #[doc = ""]
102    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/DOMRect)"]
103    #[doc = ""]
104    #[doc = "*This API requires the following crate features to be activated: `DomRect`*"]
105    pub fn new_with_x_and_y_and_width_and_height(
106        x: f64,
107        y: f64,
108        width: f64,
109        height: f64,
110    ) -> Result<DomRect, JsValue>;
111}