From c91cded60113ffe3125f2b20a923a8840171642c Mon Sep 17 00:00:00 2001 From: Vince Pike Date: Thu, 18 Feb 2021 08:40:51 -0500 Subject: [PATCH] Update scrollHeight and scrollTop --- .../web-sys/src/features/gen_HtmlElement.rs | 28 +++++++++++++++++++ .../webidls/enabled/HTMLElement.webidl | 4 +++ 2 files changed, 32 insertions(+) diff --git a/crates/web-sys/src/features/gen_HtmlElement.rs b/crates/web-sys/src/features/gen_HtmlElement.rs index 74cdc639eef..b7850a6fce3 100644 --- a/crates/web-sys/src/features/gen_HtmlElement.rs +++ b/crates/web-sys/src/features/gen_HtmlElement.rs @@ -25,6 +25,34 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"] pub fn set_title(this: &HtmlElement, value: &str); + # [wasm_bindgen (structural , method , getter , js_class = "HTMLElement" , js_name = scrollHeight)] + #[doc = "Getter for the `scrollHeight` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollHeight)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"] + pub fn scroll_height(this: &HtmlElement) -> i32; + # [wasm_bindgen (structural , method , setter , js_class = "HTMLElement" , js_name = scrollHeight)] + #[doc = "Setter for the `scrollHeight` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollHeight)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"] + pub fn set_scroll_height(this: &HtmlElement, value: i32); + # [wasm_bindgen (structural , method , getter , js_class = "HTMLElement" , js_name = scrollTop)] + #[doc = "Getter for the `scrollTop` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollTop)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"] + pub fn scroll_top(this: &HtmlElement) -> i32; + # [wasm_bindgen (structural , method , setter , js_class = "HTMLElement" , js_name = scrollTop)] + #[doc = "Setter for the `scrollTop` field of this object."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/scrollTop)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`*"] + pub fn set_scroll_top(this: &HtmlElement, value: i32); # [wasm_bindgen (structural , method , getter , js_class = "HTMLElement" , js_name = lang)] #[doc = "Getter for the `lang` field of this object."] #[doc = ""] diff --git a/crates/web-sys/webidls/enabled/HTMLElement.webidl b/crates/web-sys/webidls/enabled/HTMLElement.webidl index d9befa100cd..3ec1d63d6fc 100644 --- a/crates/web-sys/webidls/enabled/HTMLElement.webidl +++ b/crates/web-sys/webidls/enabled/HTMLElement.webidl @@ -17,6 +17,10 @@ interface HTMLElement : Element { // metadata attributes [CEReactions] attribute DOMString title; + [CEReactions] + attribute long scrollHeight; + [CEReactions] + attribute long scrollTop; [CEReactions] attribute DOMString lang; // attribute boolean translate;