EventTarget patcher is incompatible with frozen EventTargets #47949
Labels
area: zones
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone
eligrey commentedNov 2, 2022
•
edited
Which @angular/* package(s) are the source of the bug?
zone.js
Is this a regression?
No
Description
I publish an API whose primary interface is a frozen EventTarget. A customer reached out to me with an error originating from Angular Zone.js (reduced testcase & error noted below) that is interfering with use of this EventTarget.
It is clear that this library is attempting to store state in EventTarget instance fields. This does not follow best practices and is inadvisable as EventTarget instances can be frozen.
Please update
zone.js/lib/common/events.tsto use private variables to store state instead of mutating public fields on EventTarget instances.Please provide a link to a minimal reproduction of the bug
JS input:
Please provide the exception or error you saw
Error:
Please provide the environment you discovered this bug in (run
ng version)Anything else?
Testcase:
The text was updated successfully, but these errors were encountered: