Skip to content

Commit c133ade

Browse files
committed
Revert breaking changes in HtmlButtonElement, HtmlInputElement, HtmlSelectElement, HtmlTextAreaElement, and use deprecated notice instead.
1 parent 4bead09 commit c133ade

File tree

8 files changed

+88
-0
lines changed

8 files changed

+88
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ extern "C" {
1212
#[doc = ""]
1313
#[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
1414
pub type HtmlButtonElement;
15+
# [wasm_bindgen (structural , method , getter , js_class = "HTMLButtonElement" , js_name = autofocus)]
16+
#[doc = "Getter for the `autofocus` field of this object."]
17+
#[doc = ""]
18+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/autofocus)"]
19+
#[doc = ""]
20+
#[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
21+
#[deprecated(
22+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
23+
)]
24+
pub fn autofocus(this: &HtmlButtonElement) -> bool;
25+
# [wasm_bindgen (structural , method , setter , js_class = "HTMLButtonElement" , js_name = autofocus)]
26+
#[doc = "Setter for the `autofocus` field of this object."]
27+
#[doc = ""]
28+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/autofocus)"]
29+
#[doc = ""]
30+
#[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
31+
#[deprecated(
32+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
33+
)]
34+
pub fn set_autofocus(this: &HtmlButtonElement, value: bool);
1535
# [wasm_bindgen (structural , method , getter , js_class = "HTMLButtonElement" , js_name = disabled)]
1636
#[doc = "Getter for the `disabled` field of this object."]
1737
#[doc = ""]

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ extern "C" {
5454
#[doc = ""]
5555
#[doc = "*This API requires the following crate features to be activated: `HtmlInputElement`*"]
5656
pub fn set_autocomplete(this: &HtmlInputElement, value: &str);
57+
# [wasm_bindgen (structural , method , getter , js_class = "HTMLInputElement" , js_name = autofocus)]
58+
#[doc = "Getter for the `autofocus` field of this object."]
59+
#[doc = ""]
60+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autofocus)"]
61+
#[doc = ""]
62+
#[doc = "*This API requires the following crate features to be activated: `HtmlInputElement`*"]
63+
#[deprecated(
64+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
65+
)]
66+
pub fn autofocus(this: &HtmlInputElement) -> bool;
67+
# [wasm_bindgen (structural , method , setter , js_class = "HTMLInputElement" , js_name = autofocus)]
68+
#[doc = "Setter for the `autofocus` field of this object."]
69+
#[doc = ""]
70+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autofocus)"]
71+
#[doc = ""]
72+
#[doc = "*This API requires the following crate features to be activated: `HtmlInputElement`*"]
73+
#[deprecated(
74+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
75+
)]
76+
pub fn set_autofocus(this: &HtmlInputElement, value: bool);
5777
# [wasm_bindgen (structural , method , getter , js_class = "HTMLInputElement" , js_name = defaultChecked)]
5878
#[doc = "Getter for the `defaultChecked` field of this object."]
5979
#[doc = ""]

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ extern "C" {
1212
#[doc = ""]
1313
#[doc = "*This API requires the following crate features to be activated: `HtmlSelectElement`*"]
1414
pub type HtmlSelectElement;
15+
# [wasm_bindgen (structural , method , getter , js_class = "HTMLSelectElement" , js_name = autofocus)]
16+
#[doc = "Getter for the `autofocus` field of this object."]
17+
#[doc = ""]
18+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/autofocus)"]
19+
#[doc = ""]
20+
#[doc = "*This API requires the following crate features to be activated: `HtmlSelectElement`*"]
21+
#[deprecated(
22+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
23+
)]
24+
pub fn autofocus(this: &HtmlSelectElement) -> bool;
25+
# [wasm_bindgen (structural , method , setter , js_class = "HTMLSelectElement" , js_name = autofocus)]
26+
#[doc = "Setter for the `autofocus` field of this object."]
27+
#[doc = ""]
28+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/autofocus)"]
29+
#[doc = ""]
30+
#[doc = "*This API requires the following crate features to be activated: `HtmlSelectElement`*"]
31+
#[deprecated(
32+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
33+
)]
34+
pub fn set_autofocus(this: &HtmlSelectElement, value: bool);
1535
# [wasm_bindgen (structural , method , getter , js_class = "HTMLSelectElement" , js_name = autocomplete)]
1636
#[doc = "Getter for the `autocomplete` field of this object."]
1737
#[doc = ""]

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ extern "C" {
2626
#[doc = ""]
2727
#[doc = "*This API requires the following crate features to be activated: `HtmlTextAreaElement`*"]
2828
pub fn set_autocomplete(this: &HtmlTextAreaElement, value: &str);
29+
# [wasm_bindgen (structural , method , getter , js_class = "HTMLTextAreaElement" , js_name = autofocus)]
30+
#[doc = "Getter for the `autofocus` field of this object."]
31+
#[doc = ""]
32+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/autofocus)"]
33+
#[doc = ""]
34+
#[doc = "*This API requires the following crate features to be activated: `HtmlTextAreaElement`*"]
35+
#[deprecated(
36+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
37+
)]
38+
pub fn autofocus(this: &HtmlTextAreaElement) -> bool;
39+
# [wasm_bindgen (structural , method , setter , js_class = "HTMLTextAreaElement" , js_name = autofocus)]
40+
#[doc = "Setter for the `autofocus` field of this object."]
41+
#[doc = ""]
42+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/autofocus)"]
43+
#[doc = ""]
44+
#[doc = "*This API requires the following crate features to be activated: `HtmlTextAreaElement`*"]
45+
#[deprecated(
46+
note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
47+
)]
48+
pub fn set_autofocus(this: &HtmlTextAreaElement, value: bool);
2949
# [wasm_bindgen (structural , method , getter , js_class = "HTMLTextAreaElement" , js_name = cols)]
3050
#[doc = "Getter for the `cols` field of this object."]
3151
#[doc = ""]

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// http://www.whatwg.org/specs/web-apps/current-work/#the-button-element
1414
[HTMLConstructor]
1515
interface HTMLButtonElement : HTMLElement {
16+
[CEReactions, SetterThrows, Pure, RustDeprecated="Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."]
17+
attribute boolean autofocus;
1618
[CEReactions, SetterThrows, Pure]
1719
attribute boolean disabled;
1820
[Pure]

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ interface HTMLInputElement : HTMLElement {
3131
attribute DOMString alt;
3232
[CEReactions, Pure, SetterThrows]
3333
attribute DOMString autocomplete;
34+
[CEReactions, Pure, SetterThrows, RustDeprecated="Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."]
35+
attribute boolean autofocus;
3436
[CEReactions, Pure, SetterThrows]
3537
attribute boolean defaultChecked;
3638
[Pure]

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
[HTMLConstructor]
1111
interface HTMLSelectElement : HTMLElement {
12+
[CEReactions, SetterThrows, Pure, RustDeprecated="Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."]
13+
attribute boolean autofocus;
1214
[CEReactions, SetterThrows, Pure]
1315
attribute DOMString autocomplete;
1416
[CEReactions, SetterThrows, Pure]

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ interface XULControllers;
1919
interface HTMLTextAreaElement : HTMLElement {
2020
[CEReactions, SetterThrows, Pure]
2121
attribute DOMString autocomplete;
22+
[CEReactions, SetterThrows, Pure, RustDeprecated="Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."]
23+
attribute boolean autofocus;
2224
[CEReactions, SetterThrows, Pure]
2325
attribute unsigned long cols;
2426
// attribute DOMString dirName;

0 commit comments

Comments
 (0)