[Bug 25529] Cloning should be atomic

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25529

--- Comment #4 from Dimitri Glazkov <dglazkov@chromium.org> ---
(In reply to Anne from comment #3)
> Dimitri, if we are to explain existing elements in terms of components, how
> would you answer the question in comment 2?

For custom elements, you're exactly right. Creating an element and running its
created callback occur at two different quantums of time, so yes, when the
callback runs, the attributes will be already set.

For existing HTML elements, it's a darn good question. If we look at the way
browsers implement them, we'll see the need for more immediate/synchronous
invocation of these callbacks.

Right now, I am playing with of extracting the time shift between creation and
callback invocation into a barrier abstraction:
https://github.com/dglazkov/html-as-custom-elements#callback-barriers

The idea would be that we impose this barrier on author-created custom
elements, but let HTML elements' callbacks be invoked immediately.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 6 May 2014 17:23:52 UTC