[w3c/webcomponents] attributeChanged callback won't be enqueued for cloned custom elements (#590)

To [**clone**](https://dom.spec.whatwg.org/#concept-node-clone) a *node*, step 2.1. [creates an element](https://dom.spec.whatwg.org/#concept-create-element) with *synchronous custom elements flag* unset, and then [**append**](https://dom.spec.whatwg.org/#concept-element-attributes-append) each attribute to the cloned element.

However, [creating an element](https://dom.spec.whatwg.org/#concept-create-element) with *synchronous custom elements flag* unset would set [**custom element state**](https://dom.spec.whatwg.org/#concept-element-custom-element-state) to "undefined"in step 6.2.1. 

Thus, when [**appending**](https://dom.spec.whatwg.org/#concept-element-attributes-append) an attribute in step 2.2.2. of [**cloning**](https://dom.spec.whatwg.org/#concept-node-clone) a node, the *element* is not [**custom**](https://dom.spec.whatwg.org/#concept-element-custom) as the custom element state is set to "undefined" here. Hence we never enqueue a custom element callback reaction for `attributeChangedCallback`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/590

Received on Wednesday, 19 October 2016 05:34:53 UTC