diff --git a/libraries/idl/org.khronos.webgl.idl b/libraries/idl/org.khronos.webgl.idl index 6d607e6bc4c..7e029965020 100644 --- a/libraries/idl/org.khronos.webgl.idl +++ b/libraries/idl/org.khronos.webgl.idl @@ -1,6 +1,7 @@ namespace org.khronos.webgl; +// Downloaded from https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl // AUTOGENERATED FILE -- DO NOT EDIT -- SEE Makefile // // WebGL IDL definitions scraped from the Khronos specification: @@ -741,6 +742,7 @@ dictionary WebGLContextEventInit : EventInit { DOMString statusMessage; }; +// Downloaded from https://www.khronos.org/registry/typedarray/specs/latest/typedarray.idl /* * typedarray.idl * diff --git a/libraries/idl/org.w3c.dom.css.idl b/libraries/idl/org.w3c.dom.css.idl index 904df1e7ee7..d701488b6ce 100644 --- a/libraries/idl/org.w3c.dom.css.idl +++ b/libraries/idl/org.w3c.dom.css.idl @@ -1,6 +1,7 @@ namespace org.w3c.dom.css; +// Downloaded from http://dev.w3.org/csswg/cssom/ [ArrayClass]interface MediaList { [TreatNullAs=EmptyString] stringifier attribute DOMString mediaText; readonly attribute unsigned long length; diff --git a/libraries/idl/org.w3c.dom.events.idl b/libraries/idl/org.w3c.dom.events.idl index c24ce4f46e3..7464fb50e33 100644 --- a/libraries/idl/org.w3c.dom.events.idl +++ b/libraries/idl/org.w3c.dom.events.idl @@ -1,6 +1,7 @@ namespace org.w3c.dom.events; +// Downloaded from http://www.w3.org/TR/uievents/ [Constructor(DOMString type, optional UIEventInit eventInitDict)] interface UIEvent : Event { readonly attribute Window? view; diff --git a/libraries/idl/org.w3c.dom.idl b/libraries/idl/org.w3c.dom.idl index 2e884354a62..0fffd391766 100644 --- a/libraries/idl/org.w3c.dom.idl +++ b/libraries/idl/org.w3c.dom.idl @@ -1,6 +1,7 @@ namespace org.w3c.dom; +// Downloaded from https://raw.githubusercontent.com/whatwg/html-mirror/master/source typedef (Int8Array or Uint8Array or Uint8ClampedArray or Int16Array or Uint16Array or Int32Array or Uint32Array or @@ -2018,6 +2019,7 @@ partial interface Window { void captureEvents(); void releaseEvents(); }; +// Downloaded from https://html.spec.whatwg.org/ typedef (Int8Array or Uint8Array or Uint8ClampedArray or Int16Array or Uint16Array or Int32Array or Uint32Array or @@ -4129,6 +4131,7 @@ partial interface Window { void captureEvents(); void releaseEvents(); }; +// Downloaded from https://raw.githubusercontent.com/whatwg/dom/master/dom.html [Constructor(DOMString type, optional EventInit eventInitDict), Exposed=(Window,Worker)] interface Event { @@ -5049,6 +5052,7 @@ interface DOMTokenList { interface DOMSettableTokenList : DOMTokenList { attribute DOMString value; }; +// Downloaded from https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html interface Selection { readonly attribute Node? anchorNode; readonly attribute unsigned long anchorOffset; @@ -5100,6 +5104,7 @@ dictionary EditingInputEventInit : EventInit { DOMString command; DOMString value; }; +// Downloaded from http://www.w3.org/TR/animation-timing/ partial interface Window { long requestAnimationFrame(FrameRequestCallback callback); void cancelAnimationFrame(long handle); diff --git a/libraries/idl/org.w3c.dom.parsing.idl b/libraries/idl/org.w3c.dom.parsing.idl index 3b956ba278d..4b6f53be4c2 100644 --- a/libraries/idl/org.w3c.dom.parsing.idl +++ b/libraries/idl/org.w3c.dom.parsing.idl @@ -1,6 +1,7 @@ namespace org.w3c.dom.parsing; +// Downloaded from http://www.w3.org/TR/DOM-Parsing/ [Constructor] interface DOMParser { [NewObject] Document parseFromString (DOMString str, SupportedType type); diff --git a/libraries/idl/org.w3c.dom.svg.idl b/libraries/idl/org.w3c.dom.svg.idl index 9331b8164e8..536a8700a0c 100644 --- a/libraries/idl/org.w3c.dom.svg.idl +++ b/libraries/idl/org.w3c.dom.svg.idl @@ -1,6 +1,7 @@ namespace org.w3c.dom.svg; +// Downloaded from http://web.archive.org/web/20150317051602/http://www.w3.org/TR/SVG11/single-page.html interface SVGDocument : Document, DocumentEvent { readonly attribute DOMString title; diff --git a/libraries/idl/org.w3c.fetch.idl b/libraries/idl/org.w3c.fetch.idl index 1bc46149cc2..c89b6de5bb1 100644 --- a/libraries/idl/org.w3c.fetch.idl +++ b/libraries/idl/org.w3c.fetch.idl @@ -1,6 +1,7 @@ namespace org.w3c.fetch; +// Downloaded from https://raw.githubusercontent.com/whatwg/fetch/master/Overview.src.html typedef (Headers or sequence> or OpenEndedDictionary) HeadersInit; [Constructor(optional HeadersInit init), Exposed=(Window,Worker)] diff --git a/libraries/idl/org.w3c.files.idl b/libraries/idl/org.w3c.files.idl index cc8f49dda37..b3f51de2724 100644 --- a/libraries/idl/org.w3c.files.idl +++ b/libraries/idl/org.w3c.files.idl @@ -1,6 +1,7 @@ namespace org.w3c.files; +// Downloaded from https://raw.githubusercontent.com/w3c/FileAPI/gh-pages/index.html [Constructor, Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options), Exposed=Window,Worker] interface Blob { readonly attribute unsigned long long size; diff --git a/libraries/idl/org.w3c.fullscreen.idl b/libraries/idl/org.w3c.fullscreen.idl index 068449e2c56..9d2d4585c8c 100644 --- a/libraries/idl/org.w3c.fullscreen.idl +++ b/libraries/idl/org.w3c.fullscreen.idl @@ -1,6 +1,7 @@ namespace org.w3c.fullscreen; +// Downloaded from https://raw.githubusercontent.com/whatwg/fullscreen/master/Overview.src.html partial interface Element { void requestFullscreen(); }; diff --git a/libraries/idl/org.w3c.notifications.idl b/libraries/idl/org.w3c.notifications.idl index d35f588d5d5..c3c7594bfb5 100644 --- a/libraries/idl/org.w3c.notifications.idl +++ b/libraries/idl/org.w3c.notifications.idl @@ -1,6 +1,7 @@ namespace org.w3c.notifications; +// Downloaded from https://raw.githubusercontent.com/whatwg/notifications/master/notifications.html [Constructor(DOMString title, optional NotificationOptions options), Exposed=(Window,Worker)] interface Notification : EventTarget { diff --git a/libraries/idl/org.w3c.performance.idl b/libraries/idl/org.w3c.performance.idl index 7d59736168e..6447bea5e43 100644 --- a/libraries/idl/org.w3c.performance.idl +++ b/libraries/idl/org.w3c.performance.idl @@ -1,10 +1,12 @@ namespace org.w3c.performance; +// Downloaded from http://www.w3.org/TR/hr-time/ typedef double DOMHighResTimeStamp; partial interface Performance { DOMHighResTimeStamp now(); }; +// Downloaded from http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ interface PerformanceTiming { readonly attribute unsigned long long navigationStart; readonly attribute unsigned long long unloadEventStart; diff --git a/libraries/idl/org.w3c.vibration.idl b/libraries/idl/org.w3c.vibration.idl index bb47739f37f..96372dd71e5 100644 --- a/libraries/idl/org.w3c.vibration.idl +++ b/libraries/idl/org.w3c.vibration.idl @@ -1,6 +1,7 @@ namespace org.w3c.vibration; +// Downloaded from http://www.w3.org/TR/vibration/ typedef (unsigned long or sequence) VibratePattern; partial interface Navigator { boolean vibrate (VibratePattern pattern); }; diff --git a/libraries/idl/org.w3c.workers.idl b/libraries/idl/org.w3c.workers.idl index 8e4625ffcda..17a958be5fa 100644 --- a/libraries/idl/org.w3c.workers.idl +++ b/libraries/idl/org.w3c.workers.idl @@ -1,6 +1,7 @@ namespace org.w3c.workers; +// Downloaded from http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html [Exposed=(Window,Worker)] interface ServiceWorker : EventTarget { readonly attribute USVString scriptURL; @@ -22,34 +23,34 @@ enum ServiceWorkerState { }; [Exposed=(Window,Worker)] interface ServiceWorkerRegistration : EventTarget { - [Unforgeable] readonly attribute ServiceWorker? installing; - [Unforgeable] readonly attribute ServiceWorker? waiting; - [Unforgeable] readonly attribute ServiceWorker? active; + [Unforgeable, SameObject] readonly attribute ServiceWorker? installing; + [Unforgeable, SameObject] readonly attribute ServiceWorker? waiting; + [Unforgeable, SameObject] readonly attribute ServiceWorker? active; readonly attribute USVString scope; void update(); - Promise unregister(); + [NewObject] Promise unregister(); // event attribute EventHandler onupdatefound; }; partial interface Navigator { - readonly attribute ServiceWorkerContainer serviceWorker; + [SameObject] readonly attribute ServiceWorkerContainer serviceWorker; }; partial interface WorkerNavigator { - readonly attribute ServiceWorkerContainer serviceWorker; + [SameObject] readonly attribute ServiceWorkerContainer serviceWorker; }; [Exposed=(Window,Worker)] interface ServiceWorkerContainer : EventTarget { - [Unforgeable] readonly attribute ServiceWorker? controller; - readonly attribute Promise ready; + [Unforgeable, SameObject] readonly attribute ServiceWorker? controller; + [SameObject] readonly attribute Promise ready; - Promise register(USVString scriptURL, optional RegistrationOptions options); + [NewObject] Promise register(USVString scriptURL, optional RegistrationOptions options); - Promise getRegistration(optional USVString clientURL = ""); - Promise?> getRegistrations(); + [NewObject] Promise getRegistration(optional USVString clientURL = ""); + [NewObject] Promise?> getRegistrations(); // events @@ -66,8 +67,8 @@ interface ServiceWorkerMessageEvent : Event { readonly attribute any data; readonly attribute DOMString origin; readonly attribute DOMString lastEventId; - readonly attribute (ServiceWorker or MessagePort)? source; - readonly attribute MessagePort[]? ports; + [SameObject] readonly attribute (ServiceWorker or MessagePort)? source; + [SameObject] readonly attribute MessagePort[]? ports; void initServiceWorkerMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (ServiceWorker or MessagePort) sourceArg, sequence? portsArg); }; @@ -83,10 +84,10 @@ dictionary ServiceWorkerMessageEventInit : EventInit { interface ServiceWorkerGlobalScope : WorkerGlobalScope { // A container for a list of Client objects that correspond to // browsing contexts (or shared workers) that are on the origin of this SW - readonly attribute Clients clients; - readonly attribute ServiceWorkerRegistration registration; + [SameObject] readonly attribute Clients clients; + [SameObject] readonly attribute ServiceWorkerRegistration registration; - Promise skipWaiting(); + [NewObject] Promise skipWaiting(); attribute EventHandler oninstall; attribute EventHandler onactivate; @@ -109,7 +110,7 @@ interface Client { interface WindowClient : Client { readonly attribute VisibilityState visibilityState; readonly attribute boolean focused; - Promise focus(); + [NewObject] Promise focus(); }; enum FrameType { @@ -121,9 +122,9 @@ enum FrameType { [Exposed=ServiceWorker] interface Clients { // The objects returned will be new instances every time - Promise?> matchAll(optional ClientQueryOptions options); - Promise openWindow(USVString url); - Promise claim(); + [NewObject] Promise?> matchAll(optional ClientQueryOptions options); + [NewObject] Promise openWindow(USVString url); + [NewObject] Promise claim(); }; dictionary ClientQueryOptions { @@ -147,8 +148,8 @@ dictionary ExtendableEventInit : EventInit { }; [Constructor(DOMString type, optional FetchEventInit eventInitDict), Exposed=ServiceWorker] interface FetchEvent : ExtendableEvent { - readonly attribute Request request; - readonly attribute Client client; + [SameObject] readonly attribute Request request; + [SameObject] readonly attribute Client client; readonly attribute boolean isReload; void respondWith((Response or Promise) r); @@ -164,8 +165,8 @@ interface ExtendableMessageEvent : ExtendableEvent { readonly attribute any data; readonly attribute DOMString origin; readonly attribute DOMString lastEventId; - readonly attribute (Client or ServiceWorker or MessagePort)? source; - readonly attribute MessagePort[]? ports; + [SameObject] readonly attribute (Client or ServiceWorker or MessagePort)? source; + [SameObject] readonly attribute MessagePort[]? ports; void initExtendableMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (Client or ServiceWorker or MessagePort) sourceArg, sequence? portsArg); }; @@ -178,21 +179,21 @@ dictionary ExtendableMessageEventInit : ExtendableEventInit { sequence ports; }; partial interface Window { - readonly attribute CacheStorage caches; + [SameObject] readonly attribute CacheStorage caches; }; partial interface WorkerGlobalScope { - readonly attribute CacheStorage caches; + [SameObject] readonly attribute CacheStorage caches; }; [Exposed=(Window,Worker)] interface Cache { - Promise match(RequestInfo request, optional CacheQueryOptions options); - Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options); - Promise add(RequestInfo request); - Promise addAll(sequence requests); - Promise put(RequestInfo request, Response response); - Promise delete(RequestInfo request, optional CacheQueryOptions options); - Promise> keys(optional RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise> matchAll(optional RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise add(RequestInfo request); + [NewObject] Promise addAll(sequence requests); + [NewObject] Promise put(RequestInfo request, Response response); + [NewObject] Promise delete(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise> keys(optional RequestInfo request, optional CacheQueryOptions options); }; dictionary CacheQueryOptions { @@ -210,11 +211,11 @@ dictionary CacheBatchOperation { }; [Exposed=(Window,Worker)] interface CacheStorage { - Promise match(RequestInfo request, optional CacheQueryOptions options); - Promise has(DOMString cacheName); - Promise open(DOMString cacheName); - Promise delete(DOMString cacheName); - Promise> keys(); + [NewObject] Promise match(RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise has(DOMString cacheName); + [NewObject] Promise open(DOMString cacheName); + [NewObject] Promise delete(DOMString cacheName); + [NewObject] Promise> keys(); }; partial interface ServiceWorkerRegistration { // e.g. define an API namespace diff --git a/libraries/idl/org.w3c.xhr.idl b/libraries/idl/org.w3c.xhr.idl index cd6af9e97e1..0a6c77aaac5 100644 --- a/libraries/idl/org.w3c.xhr.idl +++ b/libraries/idl/org.w3c.xhr.idl @@ -1,6 +1,7 @@ namespace org.w3c.xhr; +// Downloaded from https://raw.githubusercontent.com/whatwg/xhr/master/Overview.src.html [Exposed=(Window,Worker)] interface XMLHttpRequestEventTarget : EventTarget { // event handlers diff --git a/libraries/tools/idl2k/src/main/kotlin/download.kt b/libraries/tools/idl2k/src/main/kotlin/download.kt index e402b01bd2d..dcc338a60b9 100644 --- a/libraries/tools/idl2k/src/main/kotlin/download.kt +++ b/libraries/tools/idl2k/src/main/kotlin/download.kt @@ -69,6 +69,7 @@ fun main(args: Array) { val (url) = pair println("Loading ${url}...") + w.appendln("// Downloaded from $url") if (url.endsWith(".idl")) { w.appendln(URL(url).readText()) } else {