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

Re: [webcomponents] Template element parser changes => Proposal for adding DocumentFragment.innerHTML

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 10 May 2012 23:58:37 +0000 (UTC)
To: Rafael Weinstein <rafaelw@google.com>
cc: Webapps WG <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.64.1205102355291.25792@ps20323.dreamhostps.com>
On Thu, 10 May 2012, Rafael Weinstein wrote:
> 
> Also, I'm curious why it's ok to peak at the first few characters of the 
> string, and not ok to peak at the token stream until we see the first 
> start tag?

Because it's predictable and easy to debug. When you're dealing with a 
weird effect caused by some accidental markup hundreds of lines down a 
string, it's really hard to work out what's going on. When the effect is 
caused by the very first thing in the string, it's much easier to notice 
it. (You see this kind problem sometimes on Web pages where text/plain 
files are sent as text/html, or text files are slightly augmented with 
HTML without properly escaping everything -- they render fine until they 
get to something that accidentally looks like markup, and the parser does 
its stuff, and you wonder why half of the 100-page document is bold.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 10 May 2012 23:59:01 GMT

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