Skip to content

Commit 68fa193

Browse files
authored
Update scrollHeight and scrollTop (#2458)
1 parent bc901ad commit 68fa193

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

crates/web-sys/src/features/gen_HtmlElement.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,34 @@ extern "C" {
2525
#[doc = ""]
2626
#[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"]
2727
pub fn set_title(this: &HtmlElement, value: &str);
28+
# [wasm_bindgen (structural , method , getter , js_class = "HTMLElement" , js_name = scrollHeight)]
29+
#[doc = "Getter for the `scrollHeight` field of this object."]
30+
#[doc = ""]
31+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollHeight)"]
32+
#[doc = ""]
33+
#[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"]
34+
pub fn scroll_height(this: &HtmlElement) -> i32;
35+
# [wasm_bindgen (structural , method , setter , js_class = "HTMLElement" , js_name = scrollHeight)]
36+
#[doc = "Setter for the `scrollHeight` field of this object."]
37+
#[doc = ""]
38+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollHeight)"]
39+
#[doc = ""]
40+
#[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"]
41+
pub fn set_scroll_height(this: &HtmlElement, value: i32);
42+
# [wasm_bindgen (structural , method , getter , js_class = "HTMLElement" , js_name = scrollTop)]
43+
#[doc = "Getter for the `scrollTop` field of this object."]
44+
#[doc = ""]
45+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollTop)"]
46+
#[doc = ""]
47+
#[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"]
48+
pub fn scroll_top(this: &HtmlElement) -> i32;
49+
# [wasm_bindgen (structural , method , setter , js_class = "HTMLElement" , js_name = scrollTop)]
50+
#[doc = "Setter for the `scrollTop` field of this object."]
51+
#[doc = ""]
52+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollTop)"]
53+
#[doc = ""]
54+
#[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"]
55+
pub fn set_scroll_top(this: &HtmlElement, value: i32);
2856
# [wasm_bindgen (structural , method , getter , js_class = "HTMLElement" , js_name = lang)]
2957
#[doc = "Getter for the `lang` field of this object."]
3058
#[doc = ""]

crates/web-sys/webidls/enabled/HTMLElement.webidl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ interface HTMLElement : Element {
1717
// metadata attributes
1818
[CEReactions]
1919
attribute DOMString title;
20+
[CEReactions]
21+
attribute long scrollHeight;
22+
[CEReactions]
23+
attribute long scrollTop;
2024
[CEReactions]
2125
attribute DOMString lang;
2226
// attribute boolean translate;

0 commit comments

Comments
 (0)