Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 292af8d

Browse filesBrowse files
feat: add command and commandfor to HTMLButtonAttributes (#16117)
* feat: add `command` and `commandfor` to `HTMLButtonAttributes` * Update .changeset/empty-cherries-act.md --------- Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 parent 90807ca commit 292af8d
Copy full SHA for 292af8d

File tree

Expand file treeCollapse file tree

2 files changed

+16
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-0
lines changed

‎.changeset/empty-cherries-act.md

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: add `command` and `commandfor` to `HTMLButtonAttributes`

‎packages/svelte/elements.d.ts

Copy file name to clipboardExpand all lines: packages/svelte/elements.d.ts
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,17 @@ export interface HTMLButtonAttributes extends HTMLAttributes<HTMLButtonElement>
926926
value?: string | string[] | number | undefined | null;
927927
popovertarget?: string | undefined | null;
928928
popovertargetaction?: 'toggle' | 'show' | 'hide' | undefined | null;
929+
command?:
930+
| 'show-modal'
931+
| 'close'
932+
| 'request-close'
933+
| 'show-popover'
934+
| 'hide-popover'
935+
| 'toggle-popover'
936+
| (string & {})
937+
| undefined
938+
| null;
939+
commandfor?: string | undefined | null;
929940
}
930941

931942
export interface HTMLCanvasAttributes extends HTMLAttributes<HTMLCanvasElement> {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.