- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 26 Nov 2013 20:22:52 +0000 (UTC)
- To: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>, Geoffrey Sneddon <foolistbar@googlemail.com>
- Cc: WHAT Working Group <whatwg@whatwg.org>
- Message-ID: <alpine.DEB.2.00.1311262019320.27766@ps20323.dreamhostps.com>
On Sat, 7 Sep 2013, Geoffrey Sneddon wrote: > > > > [...] this seems ... cubersome ... to implement in a conformance > > checker. Which reminds me, does > > > > # Conformance checkers must report at least one parse error > > # condition to the user if one or more parse error conditions exist > > # in the document and must not report parse error conditions if none > > # exist in the document. Conformance checkers may report more than > > # one parse error condition if more than one parse error condition > > # exists in the document. > > > > mean validator.nu and Firefox view source are non-conforming because > > they do nothing about document.write() ? > > > > I think we should exempt conformance checkers from scripts instead. > > They already are. From the "Conformance classes" section: > > > Conformance checkers must check that the input document conforms when parsed > > without a browsing context (meaning that no scripts are run, and that the > > parser's scripting flag is disabled), and should also check that the input > > document conforms when parsed with a browsing context in which scripts > > execute, and that the scripts never cause non-conforming states to occur > > other than transiently during script execution itself. (This is only a > > "SHOULD" and not a "MUST" requirement because it has been proven to be > > impossible. [COMPUTABLE]) Right. > (I feel like pedanting and pointing out this is untrue — it has not been > proven impossible to do, it has been proven impossible to do in general. I'm not sure what the distinction is here. > It wouldn't be that hard to design a conformance checker to check > "<html><script>document.write("<p>")</script>".) It wouldn't be very useful to have a conformance checker only check that literal string, and as soon as you start allowing more things, the complexity becomes astronomically high very quickly. But I'm all in favour of conformance checkers checking these things as much as possible. > On the other hand, a JS console can reasonably report parse errors from > script, so the parse errors are still worthwhile to have. Right. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 26 November 2013 20:23:18 UTC