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

Re: Unclear behavior of dictionary member default values

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 8 Jun 2012 09:37:24 +0200
Message-ID: <CADnb78inot3R6Pfiqm1y4xrbKosiWDcG0ELmi8kgSEdBY9GGaA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-script-coord@w3.org
On Fri, Jun 8, 2012 at 9:25 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> If the question was what specs use default values on dictionaries... WebGL
> does for the WebGLContextAttributes dictionary.

The problem I was pointing out is prevalent there. It appears the
WebGLContextAttributes dictionary is passed as second argument to the
getContext() method. That argument is optional. So when the dictionary
is not passed at all, you still need to define the default values in
prose.

They solve this using some prose "The default value is used either if
no second parameter is passed to getContext, or if a user object is
passed which has no attribute of the given name." but that seems
hacky. (And is not actually a conformance statement. But then WebGL
looks kind of badly written anyway. Not using RFC2119, but it is
listed in the references?)


-- 
Anne — Opera Software
http://annevankesteren.nl/
http://www.opera.com/
Received on Friday, 8 June 2012 07:37:53 UTC

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