web_sys/features/
gen_ScrollBoxObject.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (is_type_of = | _ | false , extends = "::js_sys::Object" , js_name = "ScrollBoxObject" , typescript_type = "ScrollBoxObject")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ScrollBoxObject` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
14 pub type ScrollBoxObject;
15 #[wasm_bindgen(
16 catch,
17 method,
18 getter,
19 js_class = "ScrollBoxObject",
20 js_name = "positionX"
21 )]
22 #[doc = "Getter for the `positionX` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/positionX)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
27 pub fn position_x(this: &ScrollBoxObject) -> Result<i32, JsValue>;
28 #[wasm_bindgen(
29 catch,
30 method,
31 getter,
32 js_class = "ScrollBoxObject",
33 js_name = "positionY"
34 )]
35 #[doc = "Getter for the `positionY` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/positionY)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
40 pub fn position_y(this: &ScrollBoxObject) -> Result<i32, JsValue>;
41 #[wasm_bindgen(
42 catch,
43 method,
44 getter,
45 js_class = "ScrollBoxObject",
46 js_name = "scrolledWidth"
47 )]
48 #[doc = "Getter for the `scrolledWidth` field of this object."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/scrolledWidth)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
53 pub fn scrolled_width(this: &ScrollBoxObject) -> Result<i32, JsValue>;
54 #[wasm_bindgen(
55 catch,
56 method,
57 getter,
58 js_class = "ScrollBoxObject",
59 js_name = "scrolledHeight"
60 )]
61 #[doc = "Getter for the `scrolledHeight` field of this object."]
62 #[doc = ""]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/scrolledHeight)"]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
66 pub fn scrolled_height(this: &ScrollBoxObject) -> Result<i32, JsValue>;
67 #[cfg(feature = "Element")]
68 #[wasm_bindgen(
69 catch,
70 method,
71 js_class = "ScrollBoxObject",
72 js_name = "ensureElementIsVisible"
73 )]
74 #[doc = "The `ensureElementIsVisible()` method."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/ensureElementIsVisible)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `Element`, `ScrollBoxObject`*"]
79 pub fn ensure_element_is_visible(
80 this: &ScrollBoxObject,
81 child: &Element,
82 ) -> Result<(), JsValue>;
83 #[wasm_bindgen(catch, method, js_class = "ScrollBoxObject", js_name = "scrollBy")]
84 #[doc = "The `scrollBy()` method."]
85 #[doc = ""]
86 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/scrollBy)"]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
89 pub fn scroll_by(this: &ScrollBoxObject, dx: i32, dy: i32) -> Result<(), JsValue>;
90 #[wasm_bindgen(catch, method, js_class = "ScrollBoxObject", js_name = "scrollByIndex")]
91 #[doc = "The `scrollByIndex()` method."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/scrollByIndex)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
96 pub fn scroll_by_index(this: &ScrollBoxObject, dindexes: i32) -> Result<(), JsValue>;
97 #[wasm_bindgen(catch, method, js_class = "ScrollBoxObject", js_name = "scrollTo")]
98 #[doc = "The `scrollTo()` method."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/scrollTo)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `ScrollBoxObject`*"]
103 pub fn scroll_to(this: &ScrollBoxObject, x: i32, y: i32) -> Result<(), JsValue>;
104 #[cfg(feature = "Element")]
105 #[wasm_bindgen(
106 catch,
107 method,
108 js_class = "ScrollBoxObject",
109 js_name = "scrollToElement"
110 )]
111 #[doc = "The `scrollToElement()` method."]
112 #[doc = ""]
113 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScrollBoxObject/scrollToElement)"]
114 #[doc = ""]
115 #[doc = "*This API requires the following crate features to be activated: `Element`, `ScrollBoxObject`*"]
116 pub fn scroll_to_element(this: &ScrollBoxObject, child: &Element) -> Result<(), JsValue>;
117}