W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: Simplifying element creation

From: Ojan Vafai <ojan@chromium.org>
Date: Tue, 15 Nov 2011 14:00:43 -0800
Message-ID: <CANMdWTs6qVa+KqReURDQBC3FJ+L+TYVoStDepz10UOb9jFSoKw@mail.gmail.com>
To: James Graham <jgraham@opera.com>
Cc: Ryosuke Niwa <rniwa@webkit.org>, Aryeh Gregor <ayg@aryeh.name>, Anne van Kesteren <annevk@opera.com>, "www-dom@w3.org" <www-dom@w3.org>
On Tue, Nov 15, 2011 at 1:43 PM, James Graham <jgraham@opera.com> wrote:

>
> On Tue, 15 Nov 2011, Ojan Vafai wrote:
>
>  On Tue, Nov 15, 2011 at 11:40 AM, Ryosuke Niwa <rniwa@webkit.org> wrote:
>>      On Tue, Nov 15, 2011 at 11:32 AM, Ojan Vafai <ojan@chromium.org>
>> wrote:
>>                  But I think this syntax is far more concise and readable
>> than anything
>>                  else proposed so far, and it's also likely to be the
>> most efficient
>>                  (only one function call).  This is the only kind of
>> syntax that will
>>                  actually displace innerHTML and all its XSS problems.
>>
>>
>> Agreed. Although, I share Ryosuke's sadness that it encourages having
>> lots of whitespace textnodes everywhere in your DOM. Not sure what we could
>> do about that.
>>
>>
>> Maybe we need another quasi that ignores whitespace?
>>
>>
>> I thought of that, but it's hard to define which whitespace to ignore.
>> You often won't want to ignore all whitespace. Also, it would be nice if we
>> avoided adding too much API surface. If I heard a
>> good proposal, I'd be open to it though. In either case, it should be a
>> separate thread from this one. This thread is already too long to make
>> sense of.
>>
>
> I don't understand why you care about whitespace here but not in parsing
> documents or innerHTML.


Yeah, the more I think about this, the more I think we shouldn't try to
solve that problem here.
Received on Tuesday, 15 November 2011 22:01:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT