2013-11-05 18:16:26 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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;
|
2014-01-31 21:12:32 +04:00
|
|
|
|
2013-11-05 18:16:26 +04:00
|
|
|
readonly attribute WorkerLocation location;
|
|
|
|
|
2015-03-06 06:48:07 +03:00
|
|
|
[Throws]
|
2013-11-05 18:16:26 +04:00
|
|
|
void close();
|
|
|
|
attribute OnErrorEventHandler onerror;
|
|
|
|
|
2013-11-20 03:08:50 +04:00
|
|
|
attribute EventHandler onoffline;
|
|
|
|
attribute EventHandler ononline;
|
2013-11-05 18:16:26 +04:00
|
|
|
// also has additional members in a partial interface
|
|
|
|
};
|
|
|
|
|
|
|
|
partial interface WorkerGlobalScope {
|
|
|
|
[Throws]
|
|
|
|
void importScripts(DOMString... urls);
|
|
|
|
|
|
|
|
readonly attribute WorkerNavigator navigator;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
|
|
|
// XXXbz no spec for this yet, because the webperf WG is a bit dysfunctional
|
2014-11-07 22:10:39 +03:00
|
|
|
[Constant, Cached]
|
2014-08-30 03:50:06 +04:00
|
|
|
readonly attribute Performance performance;
|
2013-11-05 18:16:26 +04:00
|
|
|
};
|