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

Rename EventTarget#on() to EventTarget#when() #161

Merged
merged 2 commits into from
Aug 13, 2024
Merged

Conversation

domfarolino
Copy link
Collaborator

@domfarolino domfarolino commented Jul 22, 2024

See #39 for discussion, and https://chromium-review.googlesource.com/c/chromium/src/+/5730072 for WPTs that will be upstreamed shortly.

Closes #39.


Preview | Diff

@domfarolino domfarolino requested review from keithamus and benlesh July 22, 2024 14:16
Copy link

@zloirock zloirock left a comment

Choose a reason for hiding this comment

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

Collision with promises .then could cause some problems - almost the same pronunciation when reading the code, 1 letter difference -> typos, etc.

@domfarolino
Copy link
Collaborator Author

We could go with EventTarget#upon(). But I still like when() a little better. I don't think then() and when() have the same pronunciation just because they rhyme.

@zloirock
Copy link

I don't think then() and when() have the same pronunciation just because they rhyme.

As a non-native English speaker, in most cases I cannot perceive the difference between them without context.

@domfarolino
Copy link
Collaborator Author

Update, I've put an X poll out for this: https://x.com/domfarolino/status/1815458583334842691 to get a feel for how the community feels.

@tetsuharuohzeki

This comment was marked as off-topic.

@domfarolino
Copy link
Collaborator Author

Conversation about naming should be had in #39.

@WICG WICG locked as off-topic and limited conversation to collaborators Jul 22, 2024
Copy link
Collaborator

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

LGTM

@WICG WICG unlocked this conversation Aug 12, 2024
@domfarolino
Copy link
Collaborator Author

Given the discussion in #39 (comment) and #39 (comment), and the general support for those comments I'm seeing, I'm comfortable moving forward with this PR. I'll merge this PR later today.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 13, 2024
See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 13, 2024
See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340875}
@domfarolino domfarolino merged commit 9866a5e into master Aug 13, 2024
2 checks passed
@domfarolino domfarolino deleted the rename-on-to-when branch August 13, 2024 10:38
github-actions bot added a commit that referenced this pull request Aug 13, 2024
SHA: 9866a5e
Reason: push, by domfarolino

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 13, 2024
See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340875}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 15, 2024
…get#when(), a=testonly

Automatic update from web-platform-tests
DOM: Rename EventTarget#on() to EventTarget#when()

See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340875}

--

wpt-commits: c4e3d193ad0d0e708ad2f252a245c368df098c6e
wpt-pr: 47237
@MrHBS
Copy link

MrHBS commented Aug 18, 2024

on was much better :(

ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Aug 19, 2024
…get#when(), a=testonly

Automatic update from web-platform-tests
DOM: Rename EventTarget#on() to EventTarget#when()

See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340875}

--

wpt-commits: c4e3d193ad0d0e708ad2f252a245c368df098c6e
wpt-pr: 47237
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Aug 22, 2024
…get#when(), a=testonly

Automatic update from web-platform-tests
DOM: Rename EventTarget#on() to EventTarget#when()

See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1340875}

--

wpt-commits: c4e3d193ad0d0e708ad2f252a245c368df098c6e
wpt-pr: 47237
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Aug 23, 2024
…get#when(), a=testonly

Automatic update from web-platform-tests
DOM: Rename EventTarget#on() to EventTarget#when()

See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarharchromium.org>
Commit-Queue: Dominic Farolino <domchromium.org>
Cr-Commit-Position: refs/heads/main{#1340875}

--

wpt-commits: c4e3d193ad0d0e708ad2f252a245c368df098c6e
wpt-pr: 47237

UltraBlame original commit: 635103775408664b51f70080db91b67ba60941b8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Aug 23, 2024
…get#when(), a=testonly

Automatic update from web-platform-tests
DOM: Rename EventTarget#on() to EventTarget#when()

See the discussion in WICG/observable#39,
which led to this decision, and
WICG/observable#161 for the corresponding spec
rename.

R=jarhar

Bug: 40282760
Change-Id: I9cd744460a3545c74fb34a0418c6ffddc5e6d4e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5730072
Reviewed-by: Joey Arhar <jarharchromium.org>
Commit-Queue: Dominic Farolino <domchromium.org>
Cr-Commit-Position: refs/heads/main{#1340875}

--

wpt-commits: c4e3d193ad0d0e708ad2f252a245c368df098c6e
wpt-pr: 47237

UltraBlame original commit: 635103775408664b51f70080db91b67ba60941b8
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.

on() collides with all sorts of code in the wild.
5 participants