- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Tue, 20 Sep 2011 09:17:29 +0300
- To: www-validator@w3.org, msanderz@att.net
20.9.2011 2:14, msanderz wrote: > *The validator fails to recognize DOM objects in this case: > HTML code: > var linkNew = new splash("splash_new", "images/splash_new.gif", * > *"openPage('whatsnew.html')", > "<p>What is new?</p>", "whatsnew.html" );* It's not about DOM - the validator knows nothing about any DOM, it operates on markup only, and it does not analyze JavaScript code in any way, except as character data, still less interpret it. It's the end tag </p> that causes the problem. You need to use e.g. "<p>What is new?</" + "p>" so that the tag gets broken (but the pieces are put together when the JavaScript code is executed). The validator FAQ has an indirect entry on this - it points to http://www.htmlhelp.com/tools/validator/problems.html#script (which suggests another workaround). -- Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 20 September 2011 06:18:10 UTC