Re: [w3c/webcomponents] [Custom]: Callback for cloneNode/importNode (bugzilla: 24570) (#176)

These are the questions we need to answer:

* Is the method "static"; or if it is an "instance" method is the receiver the source element or the new element?
* Which queue(s) facilitate the callback timing?
* What is the callback named?
* What are the conditions to cause the callback to be called/skipped?

@rniwa By scheduling in both queues, I am not intending to have two callbacks; I was suggesting the queue that reached the callback first would run it and nullify the other one.

Here's the tough part of when to run the callback: You want to pull the state from the source element before it processes any more callbacks, which could change its state; this is something controlled by the source element's queue. You want to push the state to the new element after its constructor and attribute sets and not before; this is something that depends on the new element.

@domenic It would be a shame to break transmitting state when cloning in a new document if you could, in fact, register some definition in the new document. INPUT can do this; why can't the author do this?

What do you think about taking the definition from the source node and transmitting it to the new node? That simplifies things a bunch; if you had a definition before, the new node has the same definition.

-- 
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/176#issuecomment-248904228

Received on Thursday, 22 September 2016 13:33:41 UTC