Skip to content

events: add stop propagation flag to Event.stopImmediatePropagation - #39463

Merged
aduh95 merged 1 commit into
nodejs:mainfrom
mikemadest:stop-immediate-propagation-flags
May 12, 2024
Merged

events: add stop propagation flag to Event.stopImmediatePropagation#39463
aduh95 merged 1 commit into
nodejs:mainfrom
mikemadest:stop-immediate-propagation-flags

Conversation

@mikemadest

Copy link
Copy Markdown
Contributor

Spec mention stopImmediatePropagation should set both flags:
"stop propagation" and "stop immediate propagation".

So the second is not supported by Node as there is no hierarchy and bubbling,
but the flags are both present as well as stopPropagation.

Would it make sense to follow specs on that?
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jul 20, 2021
@mikemadest
mikemadestforce-pushed the stop-immediate-propagation-flags branch from 33c4ebc to 23744d2CompareJuly 20, 2021 08:15
@mikemadestmikemadest changed the title Events: add stop propagation flag to Event.stopImmediatePropagationevents: add stop propagation flag to Event.stopImmediatePropagationJul 20, 2021
@mikemadest

mikemadest commented Jul 20, 2021

Copy link
Copy Markdown
ContributorAuthor

I didn't want to make a description too long, but feel like a bit more context could be interesting:
As part of contributing to linkedom (https://github.com/WebReflection/linkedom), I was adding event bubbling there.

When Event and EventTarget are available in Node js, the choice was to extend them to provide what was needed (bubbling in dispatchEvent).
Since node don't need the bubbling part it was expected
(I had a good read at #33556 (comment)).

But since Event had everything needed I didn't think it would be required there, except for that tiny missing line in stopImmediatePropagation and it felt like maybe this should be here?
Hoping I don't waste anybody's time here, I understand it's not game changer.

@mikemadest

Copy link
Copy Markdown
ContributorAuthor

Should this be closed?
This was approved but now is quite old and I'm not sure if there is any interest in merging it. I solved the conflicts just in case...

@benjamingr

benjamingr commented Jun 26, 2023

Copy link
Copy Markdown
Member

No this fix looks correct it was just missed - apologies this is our bad.

@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 26, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 26, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/52488/

@mikemadest

mikemadest commented Jun 26, 2023

Copy link
Copy Markdown
ContributorAuthor

No this fix looks correct it was just missed - apologies this is our bad.

No worries, thank you for the answer!
There seems to be errors on the tests, I'll check that and will be active on this so if you don't see any changes, I'm probably working on them or trying to understand what's wrong.

@mikemadest
mikemadestforce-pushed the stop-immediate-propagation-flags branch from 527ff4d to 53f073dCompareJune 27, 2023 11:00
@mikemadest

Copy link
Copy Markdown
ContributorAuthor

Pull request updated:
solved conflicts, rebased, tested (everything passed) and pushed again. Everything should be fine now.

@benjamingr

Copy link
Copy Markdown
Member

Thank you for your patience we truly don't deserve it and apologies for the contribution experience.

Let's run CI and land this as soon as it's green.

@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 27, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 27, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mikemadest
mikemadestforce-pushed the stop-immediate-propagation-flags branch from c4739fa to d2b2e2cCompareAugust 8, 2023 12:58
@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 9, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 10, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mikemadest
mikemadestforce-pushed the stop-immediate-propagation-flags branch from d2b2e2c to d712a39CompareAugust 14, 2023 07:53
@benjamingrbenjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 14, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 14, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@benjamingrbenjamingr added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Aug 14, 2023
@nodejs-github-botnodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 14, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/39463
✔ Done loading data for nodejs/node/pull/39463
----------------------------------- PR info ------------------------------------
Title events: add stop propagation flag to Event.stopImmediatePropagation (#39463)
Author Mickael Meausoone (@mikemadest, first-time contributor)
Branch mikemadest:stop-immediate-propagation-flags -> nodejs:main
Labels needs-ci
Commits 1
- events: add stop propagation flag to Event.stopImmediatePropagation
Committers 1
- Mickael Meausoone PR-URL: https://github.com/nodejs/node/pull/39463
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum ------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/39463
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum --------------------------------------------------------------------------------
⚠ Commits were pushed since the last approving review:
⚠ - events: add stop propagation flag to Event.stopImmediatePropagation
ℹ This PR was created on Tue, 20 Jul 2021 08:02:57 GMT
✔ Approvals: 2
✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/39463#pullrequestreview-710658397
✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/39463#pullrequestreview-1569362103
✘ Last GitHub CI failed
ℹ Last Full PR CI on 2023-08-14T09:35:27Z: https://ci.nodejs.org/job/node-test-pull-request/53301/
- Querying data for job/node-test-pull-request/53301/
✔ Last Jenkins CI successful
--------------------------------------------------------------------------------
✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/5859369572

Spec mention stopImmediatePropagation should set both flags:
"stop propagation" and "stop immediate propagation".
So the second is not supported by Node as there is no
hierarchy and bubbling,
but the flags are both present as well as stopPropagation.
It would makes sense to follow specs on that.
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
@aduh95
aduh95force-pushed the stop-immediate-propagation-flags branch from d712a39 to 991ae2eCompareMay 11, 2024 17:54
@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels May 11, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95
aduh95 merged commit 04cf8c2 into nodejs:mainMay 12, 2024
@aduh95

Copy link
Copy Markdown
Contributor

Landed in 04cf8c2

targos pushed a commit that referenced this pull request May 12, 2024
Spec mention stopImmediatePropagation should set both flags:
"stop propagation" and "stop immediate propagation".
So the second is not supported by Node.js as there is no
hierarchy and bubbling,
but the flags are both present as well as stopPropagation.
It would makes sense to follow specs on that.
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
PR-URL: #39463
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@targostargos mentioned this pull request May 13, 2024
@marco-ippolitomarco-ippolito mentioned this pull request Jun 17, 2024
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
Spec mention stopImmediatePropagation should set both flags:
"stop propagation" and "stop immediate propagation".
So the second is not supported by Node.js as there is no
hierarchy and bubbling,
but the flags are both present as well as stopPropagation.
It would makes sense to follow specs on that.
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
PR-URL: #39463
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
Spec mention stopImmediatePropagation should set both flags:
"stop propagation" and "stop immediate propagation".
So the second is not supported by Node.js as there is no
hierarchy and bubbling,
but the flags are both present as well as stopPropagation.
It would makes sense to follow specs on that.
Refs: https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation
PR-URL: nodejs#39463
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@mikemadest@benjamingr@nodejs-github-bot@aduh95@jasnell