W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: innerHTML in DocumentFragment

From: Ojan Vafai <ojan@chromium.org>
Date: Thu, 3 Nov 2011 16:58:35 -0700
Message-ID: <CANMdWTutbSgigd9otP9LTaVqRrGj5MxTKnQbRFN84ME+-wvkyw@mail.gmail.com>
To: Tim Down <timdown@gmail.com>
Cc: James Graham <jgraham@opera.com>, Yehuda Katz <wycats@gmail.com>, public-webapps WG <public-webapps@w3.org>
If we can get away with it WRT web compat, we should make
createContextualFragment work context-less and we should make
DocumentFragment.innerHTML work as Yehuda describes. There are clear
use-cases for this that web devs want to do all the time.

I don't see any downside except if the web already depends on the current
behavior of these two cases throwing an error.

On Thu, Nov 3, 2011 at 4:53 PM, Tim Down <timdown@gmail.com> wrote:

> Yes, now I re-read it, that's clear. Sorry.
>
> Tim
>
> On 3 November 2011 23:51, James Graham <jgraham@opera.com> wrote:
> > On Thu, 3 Nov 2011, Tim Down wrote:
> >
> >> Have you looked at the createContextualFragment() method of Range?
> >>
> >>
> http://html5.org/specs/dom-parsing.html#dom-range-createcontextualfragment
> >
> > That doesn't meet the use case where you don't know the contextual
> element
> > upfront. As I understand it that is important for some of the use cases.
> >
> > I think this is possible to solve, but needs an extra mode in the parser.
> > Also, createcontextualFragment could be modified to take null as the
> context
> > to work in this mode.
> >
>
>
Received on Thursday, 3 November 2011 23:59:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT