W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: Implied Context Parsing (DocumentFragment.innerHTML, or similar) proposal details to be sorted out

From: Rafael Weinstein <rafaelw@google.com>
Date: Thu, 24 May 2012 22:51:16 -0700
Message-ID: <CABMdHiSeB9f3rjUw8oGN9CJhADEPSbp8+pTKdok6YG_gpL986w@mail.gmail.com>
To: Ryosuke Niwa <rniwa@webkit.org>
Cc: Webapps WG <public-webapps@w3.org>, Henri Sivonen <hsivonen@iki.fi>, "Tab Atkins Jr." <jackalmage@gmail.com>, Yehuda Katz <wycats@gmail.com>, Scott González <scott.gonzalez@gmail.com>
This seems sensible. I've updated the WebKit patch to do exactly this:


It appears that the details of the proposal are now sorted out. I'll
start a new thread describing the full API & semantics.

On Fri, May 18, 2012 at 8:29 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:
> Not that I want to start another bike-shedding, there is one clear
> distinction between innerHTML and createDocumentFragment, which is that
> innerHTML sets already-started flag on parsed script elements
> but createDocumentFragment does not (or rather it unsets it after the
> fragment parsing algorithm has ran).
> See http://html5.org/specs/dom-parsing.html#dom-range-createcontextualfragment
> There appears to be a consensus to use document.parse (which is fine with
> me), so I would like to double-check which behavior we're picking. IMO, the
> only sane choice is to unset the already-started flag since doing otherwise
> implies script elements parsed by document.parse won't be executed when
> inserted into a document.
> While we can change the behavior for template elements, I would rather have
> the same behavior between all 3 APIs (createDocumentFragment, parse, and
> template element) and let innerHTML be the outlier for legacy reasons.
> (Note: I intend to fix the bug in WebKit that already-started flag isn't
> unmarked in createDocumentFragment).
> - Ryosuke
Received on Friday, 25 May 2012 05:51:46 UTC

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