The key custom elements question: custom constructors?

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.?**

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.

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

Received on Thursday, 16 July 2015 00:46:03 UTC