On 07/16/2015 03:45 AM, Domenic Denicola wrote:
Hi all,

Ahead of next week's F2F, I'm trying to pull together some clarifying and 
stage-setting materials, proposals, lists of open issues, etc. In the
end, they all get blocked on one key question:

**Is it OK to run author code during parsing/cloning/editing/printing (in 
Gecko)/etc.?**

As of now, clone-document-for-printing is a gecko implementation detail and 
shouldn't limit anything here.
I think we'll just clone whatever data is needed to be cloned without running 
any scripts, since scripts won't run in the static clone anyway.
(but from implementation point of view I can say clone-document-for-printing is 
rather nice feature, simplified Gecko's printing setup quite a bit ;))


Running author code during cloneNode(true) can be very hard to spec and 
implement correctly, so I'd prefer if we could avoid that.




If we allow custom elements to have custom constructors, then those must run in 
order to create properly-allocated instances of those elements;
there is simply no other way to create those objects. You can shuffle the 
timing around a bit: e.g., while cloning a tree, you could either run the
constructors at the normal times, or try to do something like 
almost-synchronous constructors [1] where you run them after constructing a 
skeleton
of the cloned tree, but before inserting them into the tree. But the fact 
remains that if custom elements have custom constructors, those custom
constructors must run in the middle of all those operations.

We've danced around this question many times. But I think we need a clear 
answer from the various implementers involved before we can continue. In
particular, I'm not interested in whether the implementers think it's 
technically feasible. I'd like to know whether they think it's something we
should standardize.
It is also about someone writing a good spec for this all - no one ever managed 
to spec MutationEvents properly, and running author code during
cloneNode(true) is at least as hard problem to solve.



-Olli


I'm hoping we can settle this on-list over the next day or two so that we all 
come to the meeting with a clear starting point. Thanks very much,
and looking forward to your replies,

-Domenic

[1]: https://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0098.html



Reply via email to