Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: Source/core/dom/Promise.idl

Issue 16838012: [ABANDONED] Implement Promises. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Promise.idl
diff --git a/Source/modules/webmidi/MIDIMessageEvent.idl b/Source/core/dom/Promise.idl
similarity index 75%
copy from Source/modules/webmidi/MIDIMessageEvent.idl
copy to Source/core/dom/Promise.idl
index fe64536571a2ae96486eec838ea007ba0f2edf3b..565ae38542eb31cc77050f551f8f209785f68770 100644
--- a/Source/modules/webmidi/MIDIMessageEvent.idl
+++ b/Source/core/dom/Promise.idl
@@ -28,12 +28,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// FIXME: The spec doesn't provide details about constructor, yet.
-// See also, https://github.com/WebAudio/web-midi-api/issues/1 .
[
- EnabledAtRuntime=webMIDI,
- ConstructorTemplate=Event
-] interface MIDIMessageEvent : Event {
- [InitializedByEventConstructor] readonly attribute double receivedTime;
- [InitializedByEventConstructor] readonly attribute Uint8Array data;
+ CustomConstructor(any init),
+ EnabledAtRuntime=promise
+] interface Promise {
+ [Custom] static Promise fulfill(any value);
+ [Custom] static Promise resolve(any value);
+ [Custom] static Promise reject(any value);
+ [Custom] static Promise any(any... values);
+ [Custom] static Promise every(any... values);
+ [Custom] static Promise some(any... values);
+
+ [Custom] Promise then(AnyCallback acceptCallback, AnyCallback rejectCallback);
+ [Custom] Promise catch(AnyCallback rejectCallback);
};

Powered by Google App Engine
This is Rietveld 408576698