Re: Unclear behavior of dictionary member default values

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