Re: Using readyCallback for built-in elements, was: [webcomponents]: Of weird script elements and Benadryl

On Wed, Apr 17, 2013 at 3:00 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Tue, Apr 16, 2013 at 10:33 PM, Dimitri Glazkov <dglazkov@google.com> wrote:
>> On Mon, Apr 15, 2013 at 6:59 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
>>> The other problem we need to solve is that document.createElement(<x>)
>>> currently gives different results from new <x's interface>. E.g. new
>>> Audio() sets an attribute, document.createElement("audio") does not. I
>>> think we should settle for document.createElement("audio") also
>>> creating an attribute here.
>>
>> What if we use the newly-found power if readyCallback here?
>>
>> Suppose that HTMLAudioElement has a readyCallback that, among other things does:
>>
>> if (!this.parentNode) // aha! I am created imperatively
>>    this.setAttribute("controls");
>
> I don't understand. In either new Audio() or
> document.createElement("audio") there's no parentNode.

You're right. Sorry for the noise.

:DG<

Received on Wednesday, 17 April 2013 17:41:51 UTC