- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Wed, 17 Apr 2013 11:00:41 +0100
- To: Dimitri Glazkov <dglazkov@google.com>
- Cc: Boris Zbarsky <bzbarsky@mit.edu>, Rick Waldron <waldron.rick@gmail.com>, Daniel Buchner <daniel@mozilla.com>, Scott Miles <sjmiles@google.com>, Allen Wirfs-Brock <allen@wirfs-brock.com>, John J Barton <johnjbarton@johnjbarton.com>, Rafael Weinstein <rafaelw@google.com>, public-webapps <public-webapps@w3.org>, Blake Kaplan <mrbkap@mozilla.com>, William Chen <wchen@mozilla.com>, Jonas Sicking <jonas@sicking.cc>, Steve Orvell <sorvell@google.com>, Dave Herman <dherman@mozilla.com>
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.
> Several HTML elements will need to use the callback to build their
> shadow trees and set internal state, like <textarea>, <input>,
> <details>, <fieldset>, etc.
It seems that too is irrespective of what way is used to create these elements.
> If we just build readyCallback into DOM, we have cake.
If this is what that callback is for, I don't see the need. The above
bits can just be part of the constructor of the element.
--
http://annevankesteren.nl/
Received on Wednesday, 17 April 2013 10:01:13 UTC