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

[meta] Clean events index #8351

Merged
merged 2 commits into from
Oct 7, 2022
Merged

Conversation

dontcallmedom
Copy link
Contributor

@dontcallmedom dontcallmedom commented Oct 4, 2022

This implements the rule suggested in #8340 to have the events table only include events that the HTML spec actually fires, based the analysis done by @tidoust.

Changes made:

  • Drop click, contextmenu, copy, cut, input, paste, securitypolicyviolation and slotchange entries from the table
  • Complete the Dependencies section to mention the copy, cut and paste events defined in Clipboard API and Events, the slotchange event (about to be) defined in DOM and the securitypolicyviolation (about to be) defined in CSP.
  • Add Clipboard API and Events to the list of references.
  • Drop the reference to Page Visibility and drop Page Visibility from the list of references.

Pull request should only be merged once DOM and CSP get updated to define the securitypolicyviolation and slotchange events (marking it as draft in the meantime).


/indices.html ( diff )
/infrastructure.html ( diff )
/references.html ( diff )
/webappapis.html ( diff )

This implements the rule suggested in whatwg#8340 to have the events table only
include events that the HTML spec actually fires.

Changes made:
- Drop `click`, `contextmenu`, `copy`, `cut`, `input`, `paste`,
`securitypolicyviolation` and `slotchange` entries from the table
- Complete the Dependencies section to mention the `copy`, `cut` and `paste`
events defined in Clipboard API and Events, the `slotchange` event (about to be)
defined in DOM and the `securitypolicyviolation` (about to be) defined in CSP.
- Add Clipboard API and Events to the list of references.
- Drop the reference to Page Visibility and drop Page Visibility from the list
of references.

Pull request should only be merged once DOM and CSP get updated to define the
`securitypolicyviolation` and `slotchange` events.
@domenic domenic added clarification Standard could be clearer topic: events labels Oct 4, 2022
@dontcallmedom dontcallmedom marked this pull request as ready for review October 4, 2022 15:56
@dontcallmedom
Copy link
Contributor Author

the external PRs this PR depends on have been merged, so this should also be ready to go

@domenic
Copy link
Member

domenic commented Oct 5, 2022

I just noticed the HTML spec does fire the click event, e.g. in https://html.spec.whatwg.org/#activation:event-click-2 . So I guess we should keep it?

@domenic domenic mentioned this pull request Oct 5, 2022
3 tasks
@tidoust
Copy link

tidoust commented Oct 5, 2022

I just noticed the HTML spec does fire the click event, e.g. in https://html.spec.whatwg.org/#activation:event-click-2 . So I guess we should keep it?

Indeed. Looking at events defined elsewhere, I note that:

  • the HTML spec fires input, which could be kept as well.
  • It also fires pointercancel in drag and drop, which wasn't in the table. Should it be added too?

Other events defined elsewhere are referenced by the HTML spec but not fired, and do not appear in the table.

Alternatively, I wonder whether the criteria for inclusion in the table shouldn't be amended to: the events that HTML fires, unless they are (or should be) defined in another spec.

@Kaiido
Copy link
Member

Kaiido commented Oct 5, 2022

Sorry this may not help to write a clear definition, but it might be noted that the input event fired by HTML isn't the same as the one being defined by UI Events, the former (fired on non textual <input> elements) uses the Event interface, while the latter (fired on textual <input>, <textarea> and content-editable elements) uses the InputEvent one and is always preceded by a beforeinput event, that HTML doesn't fire.

@domenic
Copy link
Member

domenic commented Oct 6, 2022

I like the criteria of "event HTML fires", even if it's defined elsewhere. So I think including click, input, and pointercancel is a good idea.

it might be noted that the input event fired by HTML isn't the same as the one being defined by UI Events

I think they are the same event; note HTML says

when the user changes the element's value, the user agent must queue an element task on the user interaction task source given the input element to fire an event named input at the input element

which I believe includes textual elements. We just have the problem of #682.

As discussed in whatwg#8351 (comment), this update re-introduces the Usage: click COMMAND [options]

Commands are as follows ('click COMMAND --help' for more):

  build                 Build a Click package.
  buildsource           Build a Click source package.
  chroot                Use and manage a Click chroot.
  contents              Show the file-list contents of a Click package file.
  framework             List available frameworks.
  hook                  Install or remove a Click system hook.
  info                  Show manifest information for a Click package.
  install               Install a Click package (low-level; consider pkcon instead).
  list                  List installed Click packages.
  pkgdir                Print the directory where a Click package is unpacked.
  register              Register an installed Click package for a user.
  unregister            Unregister an installed Click package for a user.
  verify                Verify a Click package.

Options:
  -h, --help  show this help message and exit and  entries to the table and adds an entry for the  event that references Pointer Events.

The update also adds introductory text to the index, mentioning that the list completes the media element events and drag-and-drop events. The note that followed the table was dropped as a result.
@dontcallmedom
Copy link
Contributor Author

PR updated to incorporate all the events fired by the spec based on @tidoust 's #8351 (comment)

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Thank you!

@domenic domenic merged commit 627ee28 into whatwg:main Oct 7, 2022
@dontcallmedom dontcallmedom deleted the events-cleanup branch October 7, 2022 09:47
sideshowbarker added a commit to mdn/browser-compat-data that referenced this pull request Oct 12, 2022
sideshowbarker added a commit to mdn/browser-compat-data that referenced this pull request Oct 12, 2022
Elchi3 pushed a commit to mdn/browser-compat-data that referenced this pull request Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: events
Development

Successfully merging this pull request may close these issues.

None yet

4 participants