3 ms·
That shouldn't affect the parser, because adoptNode "simply" (read: dark rituals involving goats) changes owner document and the prototype chain but not object
by the8472 10y ago
That shouldn't affect the parser, because adoptNode "simply" (read: dark rituals involving goats) changes owner document and the prototype chain but not object identity, which means the node on the parser stack should still be valid.
The trick here is that the the invoked behavior is spread over the HTML5 and DOM specs and maybe a little Ecmascript too. In isolation they appear sane, combined together they are loose enough that this hack does not run afoul of any rules.