2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-11-05 18:16:26 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
|
|
|
|
*
|
|
|
|
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
|
|
|
|
* Software ASA.
|
|
|
|
* You are granted a license to use, reproduce and create derivative works of
|
|
|
|
* this document.
|
|
|
|
*/
|
|
|
|
|
2015-03-04 02:51:53 +03:00
|
|
|
[Exposed=(Worker)]
|
2013-11-05 18:16:26 +04:00
|
|
|
interface WorkerGlobalScope : EventTarget {
|
2015-04-27 20:38:12 +03:00
|
|
|
[Constant, Cached]
|
2013-11-05 18:16:26 +04:00
|
|
|
readonly attribute WorkerGlobalScope self;
|
|
|
|
readonly attribute WorkerLocation location;
|
2017-02-03 10:35:19 +03:00
|
|
|
readonly attribute WorkerNavigator navigator;
|
2013-11-05 18:16:26 +04:00
|
|
|
|
2015-03-06 06:48:07 +03:00
|
|
|
[Throws]
|
2017-02-03 10:35:19 +03:00
|
|
|
void importScripts(DOMString... urls);
|
|
|
|
|
2013-11-05 18:16:26 +04:00
|
|
|
attribute OnErrorEventHandler onerror;
|
|
|
|
|
2013-11-20 03:08:50 +04:00
|
|
|
attribute EventHandler onoffline;
|
|
|
|
attribute EventHandler ononline;
|
2019-06-13 12:01:41 +03:00
|
|
|
[Pref="dom.promise_rejection_events.enabled"]
|
2019-04-24 14:15:27 +03:00
|
|
|
attribute EventHandler onrejectionhandled;
|
2019-06-13 12:01:41 +03:00
|
|
|
[Pref="dom.promise_rejection_events.enabled"]
|
2019-04-24 14:15:27 +03:00
|
|
|
attribute EventHandler onunhandledrejection;
|
2013-11-05 18:16:26 +04:00
|
|
|
// also has additional members in a partial interface
|
|
|
|
};
|
|
|
|
|
2015-09-21 20:29:41 +03:00
|
|
|
WorkerGlobalScope implements GlobalCrypto;
|
2016-10-10 22:09:00 +03:00
|
|
|
WorkerGlobalScope implements WindowOrWorkerGlobalScope;
|
2013-11-05 18:16:26 +04:00
|
|
|
|
2014-10-02 06:32:05 +04:00
|
|
|
// Not implemented yet: bug 1072107.
|
|
|
|
// WorkerGlobalScope implements FontFaceSource;
|
|
|
|
|
2013-11-05 18:16:26 +04:00
|
|
|
// Mozilla extensions
|
|
|
|
partial interface WorkerGlobalScope {
|
|
|
|
|
|
|
|
void dump(optional DOMString str);
|
2014-08-30 03:50:06 +04:00
|
|
|
|
2018-11-20 04:38:37 +03:00
|
|
|
// https://w3c.github.io/hr-time/#the-performance-attribute
|
2019-08-28 20:51:37 +03:00
|
|
|
[Constant, Cached, Replaceable, BinaryName="getPerformance"]
|
2014-08-30 03:50:06 +04:00
|
|
|
readonly attribute Performance performance;
|
2018-03-01 22:24:20 +03:00
|
|
|
|
|
|
|
[Func="WorkerGlobalScope::IsInAutomation", Throws]
|
|
|
|
object getJSTestingFunctions();
|
2013-11-05 18:16:26 +04:00
|
|
|
};
|