feat: add command and commandfor attributes for button (closes #4193) (#4194)

This commit is contained in:
mskorkowski
2025-07-31 22:45:38 +02:00
committed by GitHub
parent 30b917cfc3
commit 5ba818132a
2 changed files with 5 additions and 1 deletions

View File

@@ -195,6 +195,10 @@ attributes! {
cols "cols",
/// The `colspan` attribute defines the number of columns a cell should span.
colspan "colspan",
/// The `command` attribute defines the command to be invoked when user clicks the `<button>` element which has `commandfor` attribute specified.
command "command",
/// The `commandfor` attribute defines the id of the element which button is controlling. It is generic version of `popovertarget`.
commandfor "commandfor",
/// The `content` attribute gives the value associated with the http-equiv or name attribute.
content "content",
/// The `contenteditable` attribute indicates whether the element's content is editable.

View File

@@ -249,7 +249,7 @@ html_elements! {
/// The `<body>` HTML element represents the content of an HTML document. There can be only one `<body>` element in a document.
body HtmlBodyElement [] true,
/// The `<button>` HTML element represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality.
button HtmlButtonElement [disabled, form, formaction, formenctype, formmethod, formnovalidate, formtarget, name, r#type, value, popovertarget, popovertargetaction] true,
button HtmlButtonElement [command, commandfor, disabled, form, formaction, formenctype, formmethod, formnovalidate, formtarget, name, r#type, value, popovertarget, popovertargetaction] true,
/// Use the HTML `<canvas>` element with either the canvas scripting API or the WebGL API to draw graphics and animations.
canvas HtmlCanvasElement [height, width] true,
/// The `<caption>` HTML element specifies the caption (or title) of a table.