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

Fix issue 28997: better example of passive listeners #29083

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

wbamberg
Copy link
Collaborator

@wbamberg wbamberg commented Sep 12, 2023

Fixes #28997.

This is a much more extensive than I intended fix for #28997.

The main point of #28997 was that scroll is an inappropriate event to choose, because it's not cancellable (as the page itself already says). But also, the example showed a lot of feature-detection stuff, which I don't think is very relevant any more, and didn't show anything about the actual effect of the option.

So I have:

  • written a complete live sample showing the effect of setting passive on a wheel event
  • added it to "Examples" and linked it from the section that used to contain the not-useful example

All that is in commit 9b37e12.
Then I realized that this page contains two H2 sections, "Usage notes" and "Other notes", which seemed ridiculous, so I merged them in commit d2e114b. So that commit is really just moving stuff around.

@wbamberg wbamberg requested a review from a team as a code owner September 12, 2023 23:37
@wbamberg wbamberg requested review from sideshowbarker and removed request for a team September 12, 2023 23:37
@github-actions github-actions bot added the Content:WebAPI Web API docs label Sep 12, 2023
@github-actions
Copy link
Contributor

@wbamberg
Copy link
Collaborator Author

But I suppose we should also fix #24181 here, while we are at it.

@wbamberg wbamberg changed the title Fix 28997: better example of passive listeners Fix issue 28997: better example of passive listeners Sep 14, 2023
@sideshowbarker sideshowbarker merged commit 3f6726b into mdn:main Sep 14, 2023
@yangmingshan
Copy link

Wow! This is so well written, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code example for passive option is misleading
3 participants