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

Define event constructing steps #614

Merged
merged 1 commit into from
Apr 6, 2018
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Mar 23, 2018

This hook can be used by complex Event subclasses, such as KeyboardEvent and TouchEvent, to initialize their internal state upon creation.

Fixes #414.


Preview | Diff

This hook can be used by complex Event subclasses, such as KeyboardEvent and TouchEvent, to initialize their internal state upon creation.

Fixes #414.
@annevk
Copy link
Member Author

annevk commented Mar 23, 2018

@garykac your input on this would be much appreciated as well, as this'll primarily affect UI events I think.

Copy link
Member

@hayatoito hayatoito 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, from the DOM standard's perspective.

annevk added a commit that referenced this pull request Mar 27, 2018
annevk added a commit that referenced this pull request Mar 27, 2018
annevk added a commit that referenced this pull request Mar 28, 2018
This makes a number of large changes to event dispatch:

* The algorithm can no longer return early with true. The observable
  aspect is that the event object is "uninitialized" and false might 
  be returned if the event object was already canceled.
* It accounts for Touch Events in shadow trees by adding the 
  "touch target list" which is somewhat similar to relatedTarget.
* Retargeting for event targets is now solely controlled by the event 
  dispatch algorithm. The hook for other specifications is removed.
* Retargeting now properly accounts for non-node objects.
* Dispatch in general accounts for non-node objects too now.
* If targets need to be unset to prevent exposure of a shadow tree
  this is now calculated prior to invoking listeners.

Initializing relatedTarget and "touch target list" is up to the event
classes that need it. #614 will add "event constructing steps" that
enable this.

Tests: web-platform-tests/wpt#9919
(probably still needs work given today's changes)

This closes #402, fixes #561, fixes #562, fixes #580, and fixes #602.
@annevk annevk merged commit 4c95d89 into master Apr 6, 2018
@annevk annevk deleted the annevk/event-constructing-steps branch April 6, 2018 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants