- From: Erik Arvidsson <arv@google.com>
- Date: Wed, 14 Jan 2015 13:55:07 -0500
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: Boris Zbarsky <bzbarsky@mit.edu>, public-webapps <public-webapps@w3.org>
On Wed, Jan 14, 2015 at 12:31 PM, Anne van Kesteren <annevk@annevk.nl> wrote: > On Wed, Jan 14, 2015 at 4:28 PM, Erik Arvidsson <arv@google.com> wrote: >> I don't see why it has to be done synchronously? We can do what we do >> it today and do it synchronously-ish, that is before any user script >> (script element) is executed. That way the parser does not have to be >> stalled by user script until user script would run anyway. > > Could you explain how this works in more detail? E.g. what would the > processing model be for something like this (assuming a registry > entry): > > <script> > document.write("<my-div>") > alert(document.querySelector("my-div")) > </script> document.write empties the callback queue after it has been executed. This means that the createdCallback for my-div is called after document.write() and before alert. I'm not sure how that is speced but in Blink we have an extended IDL attribute called CustomElementCallbacks which means that we are going to call the pending callbacks after the method/setter. -- erik
Received on Wednesday, 14 January 2015 18:56:04 UTC