angular/packages/zone.js/lib
arturovt a27600c463 fix(zone.js): do not mutate event listener options (may be readonly) (#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
2024-05-22 16:20:34 -07:00
..
browser refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
common fix(zone.js): do not mutate event listener options (may be readonly) (#55796) 2024-05-22 16:20:34 -07:00
extra refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
jasmine refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
jest refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
mix refactor(zone.js): update Zone bundles to call patch* functions (#53443) 2024-03-15 18:11:33 -07:00
mocha refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
node fix(zone.js): add missing APIs to Node.js fs patch (#54396) 2024-05-03 08:03:25 -07:00
rxjs refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
testing refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
zone-spec refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
BUILD.bazel refactor(zone.js): package Zone *.d.ts files (#53443) 2024-03-15 18:11:34 -07:00
zone-global.d.ts fix(zone.js): remove global declaration (#37861) 2020-10-23 15:19:49 -07:00
zone-impl.ts refactor(core): clean up clang comments and workarounds (#55750) 2024-05-13 11:10:36 -07:00
zone.api.extensions.ts refactor(zone.js): change from scripts to modules (#53445) 2024-01-09 13:20:50 -08:00
zone.configurations.api.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
zone.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00