W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: Minimum viable custom elements

From: Erik Arvidsson <arv@google.com>
Date: Wed, 14 Jan 2015 13:55:07 -0500
Message-ID: <CAJ8+Goik9edoHk--namB5HcSio6f7AG=EW8eX5doFq53D_iiZw@mail.gmail.com>
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.

Received on Wednesday, 14 January 2015 18:56:04 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC