Hacker News new | ask | show | jobs
by pornel 162 days ago
Yes. It is required for W3C's DOM APIs, which give access to parent nodes and allow all kinds of mutations whenever you want.

Event handlers + closures also create potentially complex situations you can't control, and you'll need a cycle-breaking GC to avoid leaking like IE6 did.

You can make a more restricted tree if you design your own APIs with immutability/ownership/locking, but that won't work for existing JS codebases.