-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(zone.js): do not mutate event listener options (may be readonly) #55796
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arturovt
force-pushed
the
fix/54142-zone-ac
branch
from
May 14, 2024 19:47
5dbe16b
to
29cfe68
Compare
arturovt
force-pushed
the
fix/54142-zone-ac
branch
3 times, most recently
from
May 15, 2024 16:27
651aea4
to
2b8f010
Compare
AndrewKushnir
added
action: review
The PR is still awaiting reviews from at least one requested reviewer
area: zones
requires: TGP
This PR requires a passing TGP before merging is allowed
labels
May 17, 2024
AndrewKushnir
added
the
target: patch
This PR is targeted for the next patch release
label
May 17, 2024
pullapprove
bot
added
target: patch
This PR is targeted for the next patch release
and removed
target: patch
This PR is targeted for the next patch release
requires: TGP
This PR requires a passing TGP before merging is allowed
labels
May 17, 2024
JiaLiPassion
approved these changes
May 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks.
AndrewKushnir
added
requires: TGP
This PR requires a passing TGP before merging is allowed
and removed
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
May 18, 2024
pullapprove
bot
removed
requires: TGP
This PR requires a passing TGP before merging is allowed
labels
May 18, 2024
AndrewKushnir
added
the
requires: TGP
This PR requires a passing TGP before merging is allowed
label
May 19, 2024
pullapprove
bot
removed
the
requires: TGP
This PR requires a passing TGP before merging is allowed
label
May 19, 2024
AndrewKushnir
added
the
action: global presubmit
The PR is in need of a google3 global presubmit
label
May 19, 2024
Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes angular#54142
arturovt
force-pushed
the
fix/54142-zone-ac
branch
from
May 19, 2024 06:49
2b8f010
to
6679674
Compare
AndrewKushnir
added
action: merge
The PR is ready for merge by the caretaker
merge: caretaker note
Alert the caretaker performing the merge to check the PR for an out of normal action needed or note
and removed
action: global presubmit
The PR is in need of a google3 global presubmit
labels
May 20, 2024
Caretaker note: TGP is "green" (except for unrelated build breakages), this PR is ready for merge. |
This PR was merged into the repository by commit 85c1719. |
dylhunn
pushed a commit
that referenced
this pull request
May 22, 2024
…55796) Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes #54142 PR Close #55796
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: merge
The PR is ready for merge by the caretaker
area: zones
merge: caretaker note
Alert the caretaker performing the merge to check the PR for an out of normal action needed or note
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this commit, event listener options were mutated directly, for example,
options.signal = undefined
oroptions.once = false
.This issue arises in apps using third-party libraries where the responsibility lies
with the library provider. Some libraries, like WalletConnect, pass an abort controller
as
addEventListener
options. Because the abort controller has thesignal
property,this is a valid case. Thus, mutating options would throw an error since
signal
is a readonly property.
Even though zone.js is being deprecated as Angular moves towards zoneless change detection,
this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change
detection because they rely on third-party libraries and are not responsible for the code
used in them.
Closes #54142