summaryrefslogtreecommitdiff
path: root/dom/webidl
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2016-03-13 10:33:40 +0100
committerPale Moon <git-repo@palemoon.org>2016-03-13 10:33:40 +0100
commit6ccc92da0be5b713b4086c29366aaeeed8f9bdad (patch)
tree313799f239cf03400a783d04c825c3a8ba8637d6 /dom/webidl
parentb9fdf024bdf21cf7d5e03f62b1e0b90d9646cb58 (diff)
parenta8a6cb509248b897a00d7a4b439efffa05e60bcc (diff)
downloadpalemoon-gre-6ccc92da0be5b713b4086c29366aaeeed8f9bdad.tar.gz
Merge branch 'master' into URL_API-work
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/Promise.webidl22
1 files changed, 8 insertions, 14 deletions
diff --git a/dom/webidl/Promise.webidl b/dom/webidl/Promise.webidl
index b74649aec..13e13f96f 100644
--- a/dom/webidl/Promise.webidl
+++ b/dom/webidl/Promise.webidl
@@ -7,30 +7,24 @@
* http://dom.spec.whatwg.org/#promises
*/
-interface PromiseResolver {
- void resolve(optional any value);
- void reject(optional any value);
-};
-
-callback PromiseInit = void (PromiseResolver resolver);
+// TODO We use object instead Function. There is an open issue on WebIDL to
+// have different types for "platform-provided function" and "user-provided
+// function"; for now, we just use "object".
+callback PromiseInit = void (object resolve, object reject);
callback AnyCallback = any (optional any value);
[PrefControlled, Constructor(PromiseInit init)]
interface Promise {
- // TODO: update this interface - bug 875289
-
+ // TODO bug 875289 - static Promise fulfill(any value);
[Creator, Throws]
static Promise resolve(any value); // same as any(value)
[Creator, Throws]
static Promise reject(any value);
[Creator]
- Promise then(optional AnyCallback? resolveCallback = null,
- optional AnyCallback? rejectCallback = null);
+ Promise then([TreatUndefinedAs=Missing] optional AnyCallback fulfillCallback,
+ [TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
[Creator]
- Promise catch(optional AnyCallback? rejectCallback = null);
-
- void done(optional AnyCallback? resolveCallback = null,
- optional AnyCallback? rejectCallback = null);
+ Promise catch([TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
};