Skip to content

Conversation

keithamus
Copy link
Contributor

This adds the TabContainerChangeEvent, rather than using CustomEvent which is not a best practice, and existed mostly because Event used to not be extensible.

Using TabContainerChangedEvent we can put properties directly on the event, rather than the awkward detail prop.

In addition to this, I've added the onTabContainerChange and onTabContainerChanged props to the element, which allow the "old school" assignment of the property to add an event listener. This allows frameworks like React to seamlessly use these events too. We did this in github/relative-time-element#246

@keithamus keithamus requested a review from a team as a code owner February 14, 2024 16:42
Copy link
Member

@owenniblock owenniblock left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@keithamus keithamus merged commit ddbcba0 into main Feb 14, 2024
@keithamus keithamus deleted the add-tabcontainerchange-event-class branch February 14, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants