W3C home > Mailing lists > Public > www-html@w3.org > November 2013

Conformance of documents using IDL attributes outside the spec

From: Jukka K. Korpela <jukka.k.korpela@kolumbus.fi>
Date: Fri, 08 Nov 2013 15:27:26 +0200
Message-ID: <527CE6BE.7010405@kolumbus.fi>
To: www-html@w3.org
A document using an attribute like onpaste=... is of course 
nonconforming, and HTML5 validators reject it. What if a document 
assigns an onpaste event handler to an element purely in JavaScript? 

document.body.onpaste = function () { alert('No paste!'); return false }

I suppose the answer is that it, too, is nonconforming, but on what 
grounds? Is there an explicit statement that one could refer to, say, in 
court, if a contract says that pages must conform to HTML5?

Or is it so that the document is conforming, but user agents that handle 
onpaste as an event handler are nonconforming?

As such, the statement simply assigns a property to an object (though in 
practice, it is based on the assumption that a paste event may get fired 
in some browsers at least so that it gets handled by this handler). So 
if it is nonconforming, would document.body.foobar = 42 also make a 
document nonconforming?

Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Friday, 8 November 2013 13:27:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:26 UTC