In the interest of moving forward I tried to more seriously consider
Dmitry's approach. Based on es-discussion discussion
https://esdiscuss.org/topic/will-any-new-features-be-tied-to-constructors
it seems likely new JavaScript features (such as private state) will
be tied to object creation. This makes the prototype-swizzling design
even less appealing, in my opinion.

Meanwhile, I have not made much progress on the cloning question. As
Domenic pointed out, that would also either require
prototype-swizzling or invoking the constructor, there's not really a
third way. I guess for that to work cloneNode() and various editing
operations would have to become resilient against JavaScript executing
in the middle of them, something that has caused (is causing?) us a
ton of headaches with mutation events. (Or the alternative, have some
kind of mode switch for the DOM which is similarly a large
undertaking.)

Not sure what to do now :-/


-- 
https://annevankesteren.nl/

Reply via email to