Bug 1577383 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This bug is to discuss about implementing `async iterable`[1].
[1] https://heycam.github.io/webidl/#idl-async-iterable

Since DOMCursor has removed, we are looking for a replacement to implement enumerate function of DeviceStorage API[2].

[2] https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/API/DeviceStorage/enumerate

How DeviceStorage gets the next File with enumerate() is handled asynchronously, caller (usually content process) asks for the next file, sends a request to parent, parent creates a blob per request, sends it back to content. The closest replacement of DOMCursor I can think of, it to define a new interface and make it async iterable, for example:
```
interface BlobList {
  async iterable;
};
```
Hello bz,
I believe Fabrice has already shared some background on this topic, we look forward to hearing your feedbacks, many thanks!

Back to Bug 1577383 Comment 0