angular/packages/zone.js/lib/common
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
..
error-rewrite.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
events.ts fix(zone.js): do not mutate event listener options (may be readonly) (#55796) 2024-05-22 16:20:34 -07:00
fetch.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
promise.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
queue-microtask.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
rollup-error-rewrite.ts refactor(zone.js): update Zone bundles to call patch* functions (#53443) 2024-03-15 18:11:33 -07:00
rollup-fetch.ts refactor(zone.js): update Zone bundles to call patch* functions (#53443) 2024-03-15 18:11:33 -07:00
timers.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
to-string.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
utils.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00