W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Support for generators

From: David Bruant <bruant.d@gmail.com>
Date: Tue, 06 Nov 2012 20:35:49 +0100
Message-ID: <50996695.9020405@gmail.com>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>

The WebAPI team at Mozilla defined the DeviceStorageAPI [1] which 
contains the following:
interface DeviceStorage {
   /* ... */
  // See interface below for how to use this
  DeviceStorageCursor enumerate(optional DOMString directory)
  DeviceStorageCursor enumerateEditable(optional DOMString directory)

interface DeviceStorageCursor : DOMRequest {
  void continue();

It really feels like an ES6 generator [2]. Is it possible to add a new 
keyword that would allow people defining WebIDL interfaces to define 
generators so that we have consistent interfaces between ES code and web 
API code? For the ECMAScript binding, this keyword would obviously refer 
to an generator.


[1] https://wiki.mozilla.org/WebAPI/DeviceStorageAPI
[2] http://wiki.ecmascript.org/doku.php?id=harmony:generators
Received on Tuesday, 6 November 2012 19:36:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC