RE: Custom element design with ES6 classes and Element constructors

It does. If a framework says “use clonedCallback and we will implementing cloning for you,” we cannot add a clonedCallback with our own semantics.

Whereas, if a framework says “use [Framework.cloned] and we will implement cloning for you,” we’re in the clear.

Better yet! If a framework is a bad citizen and says “we did Element.cloned = Symbol() for you; now use [Element.cloned] and we will implement cloning for you,” we are still in the clear, since the original Element.cloned we supply with the browser is not === to the Element.cloned supplied by the framework.

This last is not at all possible with string-valued properties, since the string “clonedCallback” is the same no matter who supplies it.

Received on Wednesday, 28 January 2015 05:08:58 UTC