WICG / WICG/PEPC

Confusion between event attribute name and event type in dispatch algorithms

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
72
Forks
15
PR merge metrics
No merged PRs in 30d

Description

The event algorithms use EventsHandler attribute names (such as onvalidationstatuschange) instead of actual event types (such as validationstatuschange). In other words:

Initialize event with type "onvalidationstatuschange"

... should rather be:

Initialize event with type "validationstatuschange"

Same thing for "promptaction" and "promptdismiss".

In practice, it may be slightly easier to define the algorithms using fire an event rather than dispatch, which is slightly lower level. For example, "Dispatch onpromptaction on this" could be re-written as "Fire an event named promptaction at this with its bubbles and cancelable attributes initialized to true". You may still define a custom "Fire a promptaction event" algorithm to avoid repeating the bubbles and cancelable attributes initialization bits.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked event algorithms and the DOM definitions of “fire an event” and “dispatch.” Update the algorithms so they use event types rather than EventsHandler attribute names for validationstatuschange, promptaction, and promptdismiss, and ensure the wording consistently reflects the intended bubbles and cancelable behavior.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.