W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[indexeddb] result attribute for IDBRequest is set to undefined when calling IDBObjectStore.clear()

From: Israel Hilerio <israelh@microsoft.com>
Date: Mon, 2 May 2011 17:52:11 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D03EBDB@TK5EX14MBXC113.redmond.corp.microsoft.com>
After calling the clear() method on IDBObjectStore, the result of the IDBRequest is set to undefined according to the "steps for clearing an object store".

However, the result property in IDBRequest says that the result value is undefined when the request results in an error: "This is undefined when the request resulted in an error."

In IE, we've been using undefined to signal properties that are not available to developers and null to signal unassigned values.  It seems that null would be a better result value when the object store has been cleared.  

This would follow the same pattern we use in the deleteDatabase method where we return a null value for the result of the IDBRequest: "If the steps above are successful, the implementation must set the result of the request to null and fire a success event at the request."

What do you think?

Received on Monday, 2 May 2011 17:52:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:19 UTC