Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<details> toggle event improvements #33750

Merged
merged 2 commits into from
May 25, 2024

Conversation

tim-we
Copy link
Contributor

@tim-we tim-we commented May 25, 2024

Description

Fixed event type info (was Event but is actually ToggleEvent).
Added a bad example with an explainer note.

Motivation

I recently had to work on a legacy application and the only way I could use the toggle event was with an attribute event handler. This is when I came across the surprising behavior when the open attribute is set initially. I thought it was worth mentioning here but I can remove that part if it is considered not helpful.

@tim-we tim-we requested a review from a team as a code owner May 25, 2024 12:25
@tim-we tim-we requested review from sideshowbarker and removed request for a team May 25, 2024 12:25
@github-actions github-actions bot added Content:WebAPI Web API docs size/s 6-50 LoC changed labels May 25, 2024
Copy link
Contributor

github-actions bot commented May 25, 2024

Preview URLs

(comment last updated: 2024-05-25 12:28:14)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@tim-we
Copy link
Contributor Author

tim-we commented May 25, 2024

Note that the link to why attribute event listeners are discouraged does not work in the preview URLs provided by a bot above. I have tested it locally there it works. It should link to this page: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes#event_handler_attributes

@sideshowbarker sideshowbarker merged commit 630c591 into mdn:main May 25, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants