Re: [indexeddb] IDBDatabase.setVersion non-nullable parameter has a default for null

On Jun 10, 2011 8:13 PM, "Cameron McCormack" <cam@mcc.id.au> wrote:
>
> Mark Pilgrim:
> > What about setVersion() with no arguments? I ask because WebKit
> > currently treats it like setVersion("undefined") and I'm in the
> > process of fixing it in about 19 places.
>
> That’s the right behaviour.
>

That is highly unintuitive. What's the point of listing the argument as "not
optional" if it is, in fact, completely optional? (For that matter, why list
it as non-nullable if null is treated like the empty string and the empty
string is an acceptable value?)

Received on Saturday, 11 June 2011 00:20:46 UTC