[whatwg] Database feedback

Chris Prince cprince at google.com
Wed Nov 26 10:48:19 PST 2008


> On Mon, 26 May 2008, Chris Prince wrote:
>>
>> // On the 1st call, this line means "create a database,
>> // and set the version string to the empty string".
>> var db1 = window.openDatabase("foo", "", "", "");
>>
>> // On the 2nd call, the meaning has changed to
>> // "open the 'foo' database, regardless of the version string".
>> var db2 = window.openDatabase("foo", "", "", "");

On Wed, Nov 26, 2008 at 3:46 AM, Ian Hickson <ian at hixie.ch> wrote:
>
> Yeah, that's a bit confusing. Not sure what to do about it.

Two ideas:

* Perhaps use a different value to mean "open any version, if one
exists".  Using 'null' seems like an obvious candidate.

* Alternately, don't allow the empty string as a valid version string.
 Only use the empty string to mean "open existing".

--Chris



More information about the whatwg mailing list