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

Re: innerHTML in DocumentFragment

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 11 Nov 2011 03:11:16 -0800
Message-ID: <CA+c2ei8M8Axt5JvsYR+OYShf1FpvmtpuSqhvQvdB0Ufz+CN5gA@mail.gmail.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: public-webapps@w3.org
On Fri, Nov 11, 2011 at 3:00 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
> On Fri, Nov 11, 2011 at 11:49 AM, Anne van Kesteren <annevk@opera.com> wrote:
>>> Unfortunately <style> and <script> are parsed differently depending on
>>> if they live in foreign content or not. However this is something we
>>> can fix, and would lead to a lot of other benefits (such as scripts
>>> parsed consistently when moved around in the markup).
>> I do agree it would make sense to parse these consistently throughout
>> text/html.
> I think http://www.w3.org/Bugs/Public/show_bug.cgi?id=10901 should
> remain as WONTFIX.
>  * We have interop between Gecko, WebKit, Trident (since IE9 on this
> point) and Presto (once Ragnarök ships). Hooray! Interop is hard. When
> it has been achieved, we shouldn't self-sabotage it.

Microsoft has expressed support for changing the parser here.

>  * Even if we considered the replacement cycles of Firefox and Chrome
> to be fast enough that Firefox or Chrome legacy didn't matter,
> Microsoft has deployed XML-style tokenization of SVG in IE. (Apple has
> deployed the parsing in Safari, too.) Microsoft says IE9 will be
> supported until January 2020. Even if IE9 doesn't have a large active
> userbase all the way until 2020, I think authors who try to make Web
> content that works would be worse of if we had a period of even a
> couple of years with browsers that support SVG-in-text/html tokenizing
> script&style content substantially differently. (Which would be the
> case if we changed the tokenization but MS didn't agree to issue such
> a drastic change as a patch for IE9.)
>  * If we changed SVG style to tokenize like HTML style, we'd most
> likely end up breaking the kind of copy&paste scenarios that the SVG
> WG really wanted to work in the first place. (This argument also
> applies to script, but style is even more likely to occur in the kind
> of content one would expect to be able to copy&paste and have it just
> work.) Maybe the SVG WG has changed their mind now, but we shouldn't
> let them flipflop now that we've reached interop.

Have you ever actually talked to the SVG WG about this specific issue?
If not, please stop arguing that the SVG group wants the currently
specced behavior. Over the *years* that I have talked to them about
this they have consistently said that they prefer to have consistent
parsing for <script> and <style>.

I don't see why this is harder to change now than it was before
browsers had switched to a HTML5 parser. Fixing this now is still
going to be a help for authors.

As far as I can tell, more and more situations come up where having a
consistent parsing model for the two elements are advantageous. Yes,
it sucks that we haven't fixed this bug before now, but as far as I
can see there are no strong reasons for why it wouldn't be an
advantage to fixing it now.

/ Jonas
Received on Friday, 11 November 2011 11:12:36 UTC

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