I want to execute a callback function when the execution of DeviceStorage.enumerate is complete. The callback function adds files to a listview.
************************* var instanceOfDOMCursor = instanceOfDeviceStorage.enumerate([path][, options]); ************************* https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage.enumerate The enumerate method returns a DOMCursor object, which is inherited of DOMRequest. ************************* DOMCursor.done A boolean indicating if the cursor has reached the last result. ************************* https://developer.mozilla.org/en-US/docs/Web/API/DOMCursor But DOMCursor.done is always undefined in DOMRequest.onsuccess callback. Instead DOMRequest.result is null after all files are passed to onsuccess callback. File: abc.txt, def.txt First call of onsuccess callback: cursor.result is the object of abc.txt, cursor.done is undefined Second call of onsuccess callback: cursor.result is the object of def.txt, cursor.done is undefined Third call of onsuccess callback: cursor.result is null, cursor.done is undefined Is this spec or bug? I tested on Firefox OS 1.2 Simulator and ZTE Open 1.1. _______________________________________________ dev-webapps mailing list [email protected] https://lists.mozilla.org/listinfo/dev-webapps
