Re: [VE][html5] Form onsubmit Error: Invalid Return

Steven C. Gallafent wrote:

> I found an example under scripting:
> http://www.w3.org/TR/html5/scripting-1.html. The example code on that
> page is:
>
> <form name="pricecalc" onsubmit="return false">
>
> That example is marked as an error by the validator.

There seems to be recently introduced bug in the validator. There's a 
similar report on a problem with onclick attribute. It seems that the 
validator reports any return statement inside an event attribute as an 
error. Yet another example is that the following document is reported to be 
in error:

<!doctype html>
<title></title>
<p onmouseover="return true">foo</p>

Beware that for HTML5 documents, the validator is really an ad hoc checker 
(linter) that is supposed to check the document against some HTML5 draft. 
This is rather different from an SGML or XML markup validator. Given the 
experimental nature of this feature and the status of HTML5 as a moving 
target, strange bugs are not a big surprise.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

Received on Saturday, 22 January 2011 22:30:29 UTC