W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

[WebIDL] Allowing specifications to opt in to throwing on sets of enumerated attributes to invalid values

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 14 Nov 2012 17:32:37 -0800
Message-ID: <50A44635.4000903@mit.edu>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Right now, if you have an attribute declared with an enum type, setting 
it to a value not in the enumeration is silently ignored.  While this is 
a behavior that matches legacy XMLHttpRequest and HTML attributes, going 
forward specifications may want to throw on invalid values instead.

So I'd like to propose an extended attribute on either the IDL attribute 
or the enum itself to opt in to always throwing on invalid values.

Thoughts?

-Boris
Received on Thursday, 15 November 2012 01:33:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:07 UTC