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