Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

circular reference when JSON.stringify an element with attached event listener #705

Closed
sod opened this issue Mar 30, 2017 · 1 comment · Fixed by #712
Closed

circular reference when JSON.stringify an element with attached event listener #705

sod opened this issue Mar 30, 2017 · 1 comment · Fixed by #712

Comments

@sod
Copy link

sod commented Mar 30, 2017

zone.js might break code where an object has an HTMLElement inside and another code tries to JSON.stringify it.

Without zone.js

HTMLElement is serialized to {} by JSON.stringify:
image

With zone.js 0.8.5 and an event attached to the element

image

@JiaLiPassion
Copy link
Collaborator

@sod, thank you for posting the issue, I will make a PR to fix this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants