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

Some misc points:

- If the argument is source instead of dest, then the name should be something like clonedToCallback.
- I wonder if we want to just not call this unless both elements have the same definition? It seems unlikely that people would have a useful behavior for arbitrary elements. E.g. @rniwa's above code is pretty buggy if `source` is not an element with the same definition as `this`.
- We could make this a static callback, i.e. `static clonedCallback(source, dest) { ... }`. I think this makes more sense if we go with my above idea of only calling it when the definitions are the same.

Apologies if any of this is totally off; I'm not feeling 100% this morning.

-- 
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-248867417

Received on Thursday, 22 September 2016 10:44:53 UTC