fix: validate parent node mutations#331
Conversation
|
a bit defensive which is a bit of a slippery slope or not the goal of this project or goodbye performance but it seems fair. may I ask what's the use case for this, beside stricter adherence with DOM standard which is not a goal of this project? |
|
Fair point. I do not have a production use case. I found it while testing invalid mutation paths. The failure is not just a spec mismatch. A foreign reference can put a node in one parent list while its parentNode points to another. replaceChild can remove a node from the wrong parent. An ancestor insertion can create a cycle and make traversal hang. If invalid input is out of scope then this is not worth the hot path cost. Happy to close the PR. |
|
my time is limited and logic in the hot path for something intentionally broken is probably not worth a fix, imho. Closing but thanks for expanding on that. |
Summary
Tests