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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

zone.js attaches some enumerable properties elements #33692

sod opened this issue Nov 8, 2019 · 2 comments


Copy link

@sod sod commented Nov 8, 2019

zone.js 0.10.2

zone.js attaches some enumerable: true properties to elements with event listeners attached like __zone_symbol__clickfalse in case of a click listener.

馃敩 Minimal Reproduction

Go to, select the search field with the element inspector, then JSON.stringify($0, null, 2)

you see:


There are a lot more keys, but the other ones are properly attached as enumerable: false


This comment has been minimized.

Copy link
Contributor Author

@sod sod commented Nov 8, 2019

Seems to be added in

existingTasks = target[symbolEventName] = [];

Shouldn't that read:

Object.defineProperty(target, symbolEventName, {value: existingTasks = []});


@JoostK JoostK added the comp: zones label Nov 8, 2019
@ngbot ngbot bot added this to the needsTriage milestone Nov 8, 2019

This comment has been minimized.

Copy link

@JiaLiPassion JiaLiPassion commented Nov 8, 2019

Thanks for posting the issue, yeah, it maybe more reasonable that those property become not enumerable, but I just a little worried about such kind of change may break some applications, because some application may hack the zone.js to get the event delegates by looping the properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can鈥檛 perform that action at this time.