Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/jsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ export namespace JSXInternal {
onCompositionUpdate?: CompositionEventHandler<Target> | undefined;
onCompositionUpdateCapture?: CompositionEventHandler<Target> | undefined;

// Details Events
// Popover Events
onBeforeToggle?: ToggleEventHandler<Target> | undefined;
onToggle?: ToggleEventHandler<Target> | undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DetailsHTMLAttributes has an onToggle defined too, but as a GenericEventHandler idk if that should be removed or if it is in addition to this type (can't really remember how TS works).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be a mistake -- IIRC, the DetailsHTMLAttributes interface was created prior, then moved into this module. Later we added this entry with a backport of the correct event handler type. I think the DetailsHTML interface will take precedence too so that should probably be removed in favor of this "global" type, but that can be done separately later.

I think in the future we'll try to break up this mega list of events too, try to restrict them (where appropriate) to specific elements.


// Dialog Events
Expand Down
Loading