Skip to content

Commit

Permalink
Add bindings for HTMLFormElement.requestSubmit() (#3747)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciguy16 authored Dec 20, 2023
1 parent cc9a219 commit a070715
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

### Added

* Add bindings for `HTMLFormElement.requestSubmit()`.
[#3747](https://github.com/rustwasm/wasm-bindgen/pull/3747)

* Add bindings for `RTCRtpSender.getCapabilities(DOMString)` method, `RTCRtpCapabilities`, `RTCRtpCodecCapability` and `RTCRtpHeaderExtensionCapability`.
[#3737](https://github.com/rustwasm/wasm-bindgen/pull/3737)

Expand Down
17 changes: 17 additions & 0 deletions crates/web-sys/src/features/gen_HtmlFormElement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,23 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `HtmlFormElement`*"]
pub fn report_validity(this: &HtmlFormElement) -> bool;
# [wasm_bindgen (catch , method , structural , js_class = "HTMLFormElement" , js_name = requestSubmit)]
#[doc = "The `requestSubmit()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `HtmlFormElement`*"]
pub fn request_submit(this: &HtmlFormElement) -> Result<(), JsValue>;
# [wasm_bindgen (catch , method , structural , js_class = "HTMLFormElement" , js_name = requestSubmit)]
#[doc = "The `requestSubmit()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `HtmlFormElement`*"]
pub fn request_submit_with_submitter(
this: &HtmlFormElement,
submitter: Option<&HtmlElement>,
) -> Result<(), JsValue>;
# [wasm_bindgen (method , structural , js_class = "HTMLFormElement" , js_name = reset)]
#[doc = "The `reset()` method."]
#[doc = ""]
Expand Down
2 changes: 2 additions & 0 deletions crates/web-sys/webidls/enabled/HTMLFormElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ interface HTMLFormElement : HTMLElement {

[Throws]
undefined submit();
[Throws]
undefined requestSubmit(optional HTMLElement? submitter = null);
[CEReactions]
undefined reset();
boolean checkValidity();
Expand Down

0 comments on commit a070715

Please sign in to comment.