diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/workers/interfaces.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/workers/interfaces.idl')
-rw-r--r-- | testing/web-platform/tests/workers/interfaces.idl | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/interfaces.idl b/testing/web-platform/tests/workers/interfaces.idl new file mode 100644 index 000000000..228efba28 --- /dev/null +++ b/testing/web-platform/tests/workers/interfaces.idl @@ -0,0 +1,106 @@ +// ----------------------------------------------------------------------------- +// DOM +// ----------------------------------------------------------------------------- +[Exposed=(Window,Worker)] +interface EventTarget { + void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false); + void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false); + boolean dispatchEvent(Event event); +}; + +callback interface EventListener { + void handleEvent(Event event); +}; + +// ----------------------------------------------------------------------------- +// HTML +// ----------------------------------------------------------------------------- +[TreatNonCallableAsNull] +callback EventHandlerNonNull = any (Event event); +typedef EventHandlerNonNull? EventHandler; + +[TreatNonCallableAsNull] +callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error); +typedef OnErrorEventHandlerNonNull? OnErrorEventHandler; + +[Exposed=Worker] +interface WorkerGlobalScope : EventTarget { + readonly attribute WorkerGlobalScope self; + readonly attribute WorkerLocation location; + + void close(); + attribute OnErrorEventHandler onerror; + attribute EventHandler onlanguagechange; + attribute EventHandler onoffline; + attribute EventHandler ononline; +}; + +[Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker] +/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { + void postMessage(any message, optional sequence<Transferable> transfer); + attribute EventHandler onmessage; +}; + +//[Exposed=Worker] +partial interface WorkerGlobalScope { // not obsolete + void importScripts(DOMString... urls); + readonly attribute WorkerNavigator navigator; +}; +WorkerGlobalScope implements WindowTimers; +WorkerGlobalScope implements WindowBase64; + +[NoInterfaceObject, Exposed=(Window,Worker)] +interface WindowTimers { + long setTimeout(Function handler, optional long timeout = 0, any... arguments); + long setTimeout(DOMString handler, optional long timeout = 0, any... arguments); + void clearTimeout(optional long handle = 0); + long setInterval(Function handler, optional long timeout = 0, any... arguments); + long setInterval(DOMString handler, optional long timeout = 0, any... arguments); + void clearInterval(optional long handle = 0); +}; + +[NoInterfaceObject, Exposed=(Window,Worker)] +interface WindowBase64 { + DOMString btoa(DOMString btoa); + DOMString atob(DOMString atob); +}; + +[Exposed=Worker] +interface WorkerNavigator {}; +WorkerNavigator implements NavigatorID; +WorkerNavigator implements NavigatorLanguage; +WorkerNavigator implements NavigatorOnLine; + +[NoInterfaceObject, Exposed=(Window,Worker)] +interface NavigatorID { + readonly attribute DOMString appCodeName; // constant "Mozilla" + readonly attribute DOMString appName; + readonly attribute DOMString appVersion; + readonly attribute DOMString platform; + readonly attribute DOMString product; // constant "Gecko" + readonly attribute DOMString userAgent; +}; + +[NoInterfaceObject, Exposed=(Window,Worker)] +interface NavigatorLanguage { + readonly attribute DOMString? language; + readonly attribute DOMString[] languages; +}; + +[NoInterfaceObject, Exposed=(Window,Worker)] +interface NavigatorOnLine { + readonly attribute boolean onLine; +}; + +[Exposed=Worker] +interface WorkerLocation { + stringifier readonly attribute USVString href; + readonly attribute USVString origin; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; + readonly attribute USVString search; + readonly attribute USVString hash; +}; |