Skip to content

Run activation behavior hooks from the event dispatch algorithm #2450

Merged
domenic merged 3 commits into
jsdom:masterfrom
Zirro:fix-activation-behavior
Dec 11, 2018
Merged

Run activation behavior hooks from the event dispatch algorithm #2450
domenic merged 3 commits into
jsdom:masterfrom
Zirro:fix-activation-behavior

Conversation

@Zirro

@Zirro Zirro commented Dec 7, 2018

Copy link
Copy Markdown
Member

This adds steps regarding activation behavior from the Dispatch an event algorithm, replacing older code where the activation didn't bubble correctly.
I've also renamed the existing hooks to match the names used in the specification.

This fixes #2449 and #2367.

Comment thread lib/jsdom/living/nodes/HTMLElement-impl.js Outdated
@Zirro

Zirro commented Dec 9, 2018

Copy link
Copy Markdown
Member Author

Tests submitted in web-platform-tests/wpt#14426.

@Zirro Zirro changed the title Run activation behavior hooks from event dispatching algorithm Run activation behavior hooks from the event dispatch algorithm Dec 9, 2018
This adds steps regarding activation behavior from the 'To dispatch an event...' algorithm located at https://dom.spec.whatwg.org/#concept-event-dispatch.
I've also renamed the existing hooks to match the names used in the specification.

This fixes jsdom#2449.
@Zirro Zirro force-pushed the fix-activation-behavior branch from 17b3bbb to b5c6d56 Compare December 10, 2018 21:59
@Zirro

Zirro commented Dec 10, 2018

Copy link
Copy Markdown
Member Author

Updated to add _hasActivationBehavior instead of directly checking for the existence of the method, as it occurred to me that it'll need to be conditional for <summary> which uses HTMLElement.

@domenic

domenic commented Dec 11, 2018

Copy link
Copy Markdown
Member

Nice work. Let's wait to merge this until a WPT roll though, just out of principle :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clicking span inside a submit button does not submit the form

3 participants