Index: core/workers/WorkerGlobalScope.idl |
diff --git a/core/workers/WorkerGlobalScope.idl b/core/workers/WorkerGlobalScope.idl |
index ced2f23a456d582e07fdb5de0f84bf71104da396..1d3f4d5c13a61e502bfe9b06435a2d5fbd000252 100644 |
--- a/core/workers/WorkerGlobalScope.idl |
+++ b/core/workers/WorkerGlobalScope.idl |
@@ -24,26 +24,33 @@ |
* |
*/ |
+// https://html.spec.whatwg.org/#the-workerglobalscope-common-interface |
+ |
[ |
- Custom=ToV8, |
Exposed=Worker, |
- WillBeGarbageCollected |
] interface WorkerGlobalScope : EventTarget { |
+ readonly attribute WorkerGlobalScope self; |
+ readonly attribute WorkerLocation location; |
- // WorkerGlobalScope |
- [Replaceable] readonly attribute WorkerGlobalScope self; |
- [Replaceable] readonly attribute WorkerLocation location; |
void close(); |
+ // TODO(philipj): onerror should be an OnErrorEventHandler. |
attribute EventHandler onerror; |
- [Replaceable] readonly attribute WorkerConsole console; |
- |
+ // attribute EventHandler onlanguagechange; |
+ // attribute EventHandler onoffline; |
+ // attribute EventHandler ononline; |
- // WorkerUtils |
+ // https://html.spec.whatwg.org/#apis-available-to-workers |
[RaisesException] void importScripts(DOMString... urls); |
- [Replaceable] readonly attribute WorkerNavigator navigator; |
+ readonly attribute WorkerNavigator navigator; |
+ |
+ // Console API (non-standard but widely implemented in some form) |
+ // https://developer.chrome.com/devtools/docs/console-api |
+ [Replaceable] readonly attribute WorkerConsole console; |
- // Additional constructors |
- [MeasureAs=PrefixedWorkerURL] attribute URLConstructor webkitURL; // FIXME: deprecate this. |
+ // Unhandled Promise Rejection Events |
+ // https://github.com/domenic/unhandled-rejections-browser-spec |
+ [RuntimeEnabled=PromiseRejectionEvent] attribute EventHandler onrejectionhandled; |
+ [RuntimeEnabled=PromiseRejectionEvent] attribute EventHandler onunhandledrejection; |
}; |
WorkerGlobalScope implements WindowBase64; |