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

Re: Minimum viable custom elements

From: Ryosuke Niwa <rniwa@apple.com>
Date: Wed, 14 Jan 2015 12:27:43 -0800
Cc: Anne van Kesteren <annevk@annevk.nl>, Erik Arvidsson <arv@google.com>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps <public-webapps@w3.org>
Message-id: <44B81A4B-E674-40B2-BE86-E5CD01F50B38@apple.com>
To: Domenic Denicola <d@domenic.me>

> On Jan 14, 2015, at 12:25 PM, Domenic Denicola <d@domenic.me> wrote:
> From: Ryosuke Niwa [mailto:rniwa@apple.com] 
>> Let me restate the problem using an example.  Suppose we're parsing <my-element></my-element><my-other-element></my-other-element>.
>> Once the HTML is parsed, the DOM tree is constructed with two DOM elements.  Now we call the constructors on those elements.  Without loss of generality, let's assume we're doing this in the tree order.
>> We call the constructor of my-element first. However, inside this constructor, you can access this.nextSibling after calling super().  What's nextSibling in this case? An uninitialized my-other-element.
> Thanks, that is very helpful. And I'd guess that with the current spec, it's an uninitialized my-other-element in the sense that its createdCallback has not been called, even though its constructor (which does nothing beside the normal HTMLElement/HTMLUnknownElement stuff) has indeed been called.


- R. Niwa
Received on Wednesday, 14 January 2015 20:28:13 UTC

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