The sample is now fixed in the Editor's draft:

ECMAScript

 var request = indexedDB.open('AddressBook', '15');
 request.onsuccess = function(evt) {...};
 request.onerror = function(evt) {...};

Thanks for the catch.

Eliot



From: Maxime RETY [mailto:[email protected]] 
Sent: Friday, December 30, 2011 7:05 AM
To: [email protected]
Subject: [IndexedDB] (editorial) outdated example in "3.2.1 The IDBRequest 
Interface" section

Hi,

The example shown at the top of the "3.2.1 The IDBRequest Interface" section is 
outdated.

The first line :

var request = indexedDB.open('AddressBook', 'Address Book');

shows a call to indexedDB.open method with an invalid second parameter, which 
would fire an error (NS_ERROR_DOM_INDEXEDDB_NON_TRANSIENT_ERR).

An optional version number (type "unsigned long long") is indeed expected as 
second parameter, but the example provides a string instead.

It was possible a long time ago to provide a "description" as second parameter 
(http://www.w3.org/TR/2010/WD-IndexedDB-20100819/#requests) but it's no longer 
the case.


Kind Regards,

-- 
Maxime Réty


Reply via email to