From: Dimitri Glazkov [mailto:dglaz...@google.com] 

> Why is "Not having identity at creation-time is currently a mismatch with the 
> rest of the platform" a problem? Why does it all have to be consistent across 
> the board? Are there any other platform objects that are created by HTML 
> parser or a similar device?

In IRC we've been discussing how I don't think there's actually any 
(observable) mismatch with the rest of the platform if we are careful.

In particular, if we make it a rule that when parsing a given fragment, 
createdCallbacks run in registration order (not, say, in parse order), I think 
it works. Because then the built-in elements, which are (conceptually) 
registered first, go through the __proto__-munge + createdCallback() process 
first. Then, when the createdCallback() for any user-defined elements runs, all 
existing elements look to be already upgraded.

If we want createdCallbacks to run in parse order (which does seem probably 
better, although I'd be curious for concrete arguments why), then the only 
deviation required between custom and built-in elements is privileging the 
native elements with some ability to jump to the front the queue. Which seems 
pretty reasonable given that we already have lots of cases where custom 
elements do things sorta-async and native elements need to do things more 
synchronously. 

Reply via email to