JS update IDL definitions, append source URL to downloaded file

This commit is contained in:
Sergey Mashkov
2015-05-13 18:56:53 +03:00
committed by Sergey Mashkov
parent 7033b27ea8
commit b34da5713d
15 changed files with 59 additions and 38 deletions
+2
View File
@@ -1,6 +1,7 @@
namespace org.khronos.webgl; 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 // AUTOGENERATED FILE -- DO NOT EDIT -- SEE Makefile
// //
// WebGL IDL definitions scraped from the Khronos specification: // WebGL IDL definitions scraped from the Khronos specification:
@@ -741,6 +742,7 @@ dictionary WebGLContextEventInit : EventInit {
DOMString statusMessage; DOMString statusMessage;
}; };
// Downloaded from https://www.khronos.org/registry/typedarray/specs/latest/typedarray.idl
/* /*
* typedarray.idl * typedarray.idl
* *
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.dom.css; namespace org.w3c.dom.css;
// Downloaded from http://dev.w3.org/csswg/cssom/
[ArrayClass]interface MediaList { [ArrayClass]interface MediaList {
[TreatNullAs=EmptyString] stringifier attribute DOMString mediaText; [TreatNullAs=EmptyString] stringifier attribute DOMString mediaText;
readonly attribute unsigned long length; readonly attribute unsigned long length;
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.dom.events; namespace org.w3c.dom.events;
// Downloaded from http://www.w3.org/TR/uievents/
[Constructor(DOMString type, optional UIEventInit eventInitDict)] [Constructor(DOMString type, optional UIEventInit eventInitDict)]
interface UIEvent : Event { interface UIEvent : Event {
readonly attribute Window? view; readonly attribute Window? view;
+5
View File
@@ -1,6 +1,7 @@
namespace org.w3c.dom; namespace org.w3c.dom;
// Downloaded from https://raw.githubusercontent.com/whatwg/html-mirror/master/source
typedef (Int8Array or Uint8Array or Uint8ClampedArray or typedef (Int8Array or Uint8Array or Uint8ClampedArray or
Int16Array or Uint16Array or Int16Array or Uint16Array or
Int32Array or Uint32Array or Int32Array or Uint32Array or
@@ -2018,6 +2019,7 @@ partial interface Window {
void captureEvents(); void captureEvents();
void releaseEvents(); void releaseEvents();
}; };
// Downloaded from https://html.spec.whatwg.org/
typedef (Int8Array or Uint8Array or Uint8ClampedArray or typedef (Int8Array or Uint8Array or Uint8ClampedArray or
Int16Array or Uint16Array or Int16Array or Uint16Array or
Int32Array or Uint32Array or Int32Array or Uint32Array or
@@ -4129,6 +4131,7 @@ partial interface Window {
void captureEvents(); void captureEvents();
void releaseEvents(); void releaseEvents();
}; };
// Downloaded from https://raw.githubusercontent.com/whatwg/dom/master/dom.html
[Constructor(DOMString type, optional EventInit eventInitDict), [Constructor(DOMString type, optional EventInit eventInitDict),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface Event { interface Event {
@@ -5049,6 +5052,7 @@ interface DOMTokenList {
interface DOMSettableTokenList : DOMTokenList { interface DOMSettableTokenList : DOMTokenList {
attribute DOMString value; attribute DOMString value;
}; };
// Downloaded from https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
interface Selection { interface Selection {
readonly attribute Node? anchorNode; readonly attribute Node? anchorNode;
readonly attribute unsigned long anchorOffset; readonly attribute unsigned long anchorOffset;
@@ -5100,6 +5104,7 @@ dictionary EditingInputEventInit : EventInit {
DOMString command; DOMString command;
DOMString value; DOMString value;
}; };
// Downloaded from http://www.w3.org/TR/animation-timing/
partial interface Window { partial interface Window {
long requestAnimationFrame(FrameRequestCallback callback); long requestAnimationFrame(FrameRequestCallback callback);
void cancelAnimationFrame(long handle); void cancelAnimationFrame(long handle);
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.dom.parsing; namespace org.w3c.dom.parsing;
// Downloaded from http://www.w3.org/TR/DOM-Parsing/
[Constructor] [Constructor]
interface DOMParser { interface DOMParser {
[NewObject] Document parseFromString (DOMString str, SupportedType type); [NewObject] Document parseFromString (DOMString str, SupportedType type);
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.dom.svg; 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, interface SVGDocument : Document,
DocumentEvent { DocumentEvent {
readonly attribute DOMString title; readonly attribute DOMString title;
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.fetch; namespace org.w3c.fetch;
// Downloaded from https://raw.githubusercontent.com/whatwg/fetch/master/Overview.src.html
typedef (Headers or sequence<sequence<ByteString>> or OpenEndedDictionary<ByteString>) HeadersInit; typedef (Headers or sequence<sequence<ByteString>> or OpenEndedDictionary<ByteString>) HeadersInit;
[Constructor(optional HeadersInit init), [Constructor(optional HeadersInit init),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.files; 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 { [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; readonly attribute unsigned long long size;
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.fullscreen; namespace org.w3c.fullscreen;
// Downloaded from https://raw.githubusercontent.com/whatwg/fullscreen/master/Overview.src.html
partial interface Element { partial interface Element {
void requestFullscreen(); void requestFullscreen();
}; };
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.notifications; namespace org.w3c.notifications;
// Downloaded from https://raw.githubusercontent.com/whatwg/notifications/master/notifications.html
[Constructor(DOMString title, optional NotificationOptions options), [Constructor(DOMString title, optional NotificationOptions options),
Exposed=(Window,Worker)] Exposed=(Window,Worker)]
interface Notification : EventTarget { interface Notification : EventTarget {
+2
View File
@@ -1,10 +1,12 @@
namespace org.w3c.performance; namespace org.w3c.performance;
// Downloaded from http://www.w3.org/TR/hr-time/
typedef double DOMHighResTimeStamp; typedef double DOMHighResTimeStamp;
partial interface Performance { partial interface Performance {
DOMHighResTimeStamp now(); DOMHighResTimeStamp now();
}; };
// Downloaded from http://www.w3.org/TR/2012/REC-navigation-timing-20121217/
interface PerformanceTiming { interface PerformanceTiming {
readonly attribute unsigned long long navigationStart; readonly attribute unsigned long long navigationStart;
readonly attribute unsigned long long unloadEventStart; readonly attribute unsigned long long unloadEventStart;
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.vibration; namespace org.w3c.vibration;
// Downloaded from http://www.w3.org/TR/vibration/
typedef (unsigned long or sequence<unsigned long>) VibratePattern; partial interface Navigator { typedef (unsigned long or sequence<unsigned long>) VibratePattern; partial interface Navigator {
boolean vibrate (VibratePattern pattern); boolean vibrate (VibratePattern pattern);
}; };
+39 -38
View File
@@ -1,6 +1,7 @@
namespace org.w3c.workers; namespace org.w3c.workers;
// Downloaded from http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface ServiceWorker : EventTarget { interface ServiceWorker : EventTarget {
readonly attribute USVString scriptURL; readonly attribute USVString scriptURL;
@@ -22,34 +23,34 @@ enum ServiceWorkerState {
}; };
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface ServiceWorkerRegistration : EventTarget { interface ServiceWorkerRegistration : EventTarget {
[Unforgeable] readonly attribute ServiceWorker? installing; [Unforgeable, SameObject] readonly attribute ServiceWorker? installing;
[Unforgeable] readonly attribute ServiceWorker? waiting; [Unforgeable, SameObject] readonly attribute ServiceWorker? waiting;
[Unforgeable] readonly attribute ServiceWorker? active; [Unforgeable, SameObject] readonly attribute ServiceWorker? active;
readonly attribute USVString scope; readonly attribute USVString scope;
void update(); void update();
Promise<boolean> unregister(); [NewObject] Promise<boolean> unregister();
// event // event
attribute EventHandler onupdatefound; attribute EventHandler onupdatefound;
}; };
partial interface Navigator { partial interface Navigator {
readonly attribute ServiceWorkerContainer serviceWorker; [SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
}; };
partial interface WorkerNavigator { partial interface WorkerNavigator {
readonly attribute ServiceWorkerContainer serviceWorker; [SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
}; };
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface ServiceWorkerContainer : EventTarget { interface ServiceWorkerContainer : EventTarget {
[Unforgeable] readonly attribute ServiceWorker? controller; [Unforgeable, SameObject] readonly attribute ServiceWorker? controller;
readonly attribute Promise<ServiceWorkerRegistration> ready; [SameObject] readonly attribute Promise<ServiceWorkerRegistration> ready;
Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options); [NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options);
Promise<ServiceWorkerRegistration> getRegistration(optional USVString clientURL = ""); [NewObject] Promise<ServiceWorkerRegistration> getRegistration(optional USVString clientURL = "");
Promise<sequence<ServiceWorkerRegistration>?> getRegistrations(); [NewObject] Promise<sequence<ServiceWorkerRegistration>?> getRegistrations();
// events // events
@@ -66,8 +67,8 @@ interface ServiceWorkerMessageEvent : Event {
readonly attribute any data; readonly attribute any data;
readonly attribute DOMString origin; readonly attribute DOMString origin;
readonly attribute DOMString lastEventId; readonly attribute DOMString lastEventId;
readonly attribute (ServiceWorker or MessagePort)? source; [SameObject] readonly attribute (ServiceWorker or MessagePort)? source;
readonly attribute MessagePort[]? ports; [SameObject] readonly attribute MessagePort[]? ports;
void initServiceWorkerMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (ServiceWorker or MessagePort) sourceArg, sequence<MessagePort>? portsArg); void initServiceWorkerMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (ServiceWorker or MessagePort) sourceArg, sequence<MessagePort>? portsArg);
}; };
@@ -83,10 +84,10 @@ dictionary ServiceWorkerMessageEventInit : EventInit {
interface ServiceWorkerGlobalScope : WorkerGlobalScope { interface ServiceWorkerGlobalScope : WorkerGlobalScope {
// A container for a list of Client objects that correspond to // A container for a list of Client objects that correspond to
// browsing contexts (or shared workers) that are on the origin of this SW // browsing contexts (or shared workers) that are on the origin of this SW
readonly attribute Clients clients; [SameObject] readonly attribute Clients clients;
readonly attribute ServiceWorkerRegistration registration; [SameObject] readonly attribute ServiceWorkerRegistration registration;
Promise<void> skipWaiting(); [NewObject] Promise<void> skipWaiting();
attribute EventHandler oninstall; attribute EventHandler oninstall;
attribute EventHandler onactivate; attribute EventHandler onactivate;
@@ -109,7 +110,7 @@ interface Client {
interface WindowClient : Client { interface WindowClient : Client {
readonly attribute VisibilityState visibilityState; readonly attribute VisibilityState visibilityState;
readonly attribute boolean focused; readonly attribute boolean focused;
Promise<WindowClient> focus(); [NewObject] Promise<WindowClient> focus();
}; };
enum FrameType { enum FrameType {
@@ -121,9 +122,9 @@ enum FrameType {
[Exposed=ServiceWorker] [Exposed=ServiceWorker]
interface Clients { interface Clients {
// The objects returned will be new instances every time // The objects returned will be new instances every time
Promise<sequence<Client>?> matchAll(optional ClientQueryOptions options); [NewObject] Promise<sequence<Client>?> matchAll(optional ClientQueryOptions options);
Promise<WindowClient> openWindow(USVString url); [NewObject] Promise<WindowClient> openWindow(USVString url);
Promise<void> claim(); [NewObject] Promise<void> claim();
}; };
dictionary ClientQueryOptions { dictionary ClientQueryOptions {
@@ -147,8 +148,8 @@ dictionary ExtendableEventInit : EventInit {
}; };
[Constructor(DOMString type, optional FetchEventInit eventInitDict), Exposed=ServiceWorker] [Constructor(DOMString type, optional FetchEventInit eventInitDict), Exposed=ServiceWorker]
interface FetchEvent : ExtendableEvent { interface FetchEvent : ExtendableEvent {
readonly attribute Request request; [SameObject] readonly attribute Request request;
readonly attribute Client client; [SameObject] readonly attribute Client client;
readonly attribute boolean isReload; readonly attribute boolean isReload;
void respondWith((Response or Promise<Response>) r); void respondWith((Response or Promise<Response>) r);
@@ -164,8 +165,8 @@ interface ExtendableMessageEvent : ExtendableEvent {
readonly attribute any data; readonly attribute any data;
readonly attribute DOMString origin; readonly attribute DOMString origin;
readonly attribute DOMString lastEventId; readonly attribute DOMString lastEventId;
readonly attribute (Client or ServiceWorker or MessagePort)? source; [SameObject] readonly attribute (Client or ServiceWorker or MessagePort)? source;
readonly attribute MessagePort[]? ports; [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<MessagePort>? portsArg); void initExtendableMessageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, (Client or ServiceWorker or MessagePort) sourceArg, sequence<MessagePort>? portsArg);
}; };
@@ -178,21 +179,21 @@ dictionary ExtendableMessageEventInit : ExtendableEventInit {
sequence<MessagePort> ports; sequence<MessagePort> ports;
}; };
partial interface Window { partial interface Window {
readonly attribute CacheStorage caches; [SameObject] readonly attribute CacheStorage caches;
}; };
partial interface WorkerGlobalScope { partial interface WorkerGlobalScope {
readonly attribute CacheStorage caches; [SameObject] readonly attribute CacheStorage caches;
}; };
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface Cache { interface Cache {
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
Promise<void> add(RequestInfo request); [NewObject] Promise<void> add(RequestInfo request);
Promise<void> addAll(sequence<RequestInfo> requests); [NewObject] Promise<void> addAll(sequence<RequestInfo> requests);
Promise<void> put(RequestInfo request, Response response); [NewObject] Promise<void> put(RequestInfo request, Response response);
Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
}; };
dictionary CacheQueryOptions { dictionary CacheQueryOptions {
@@ -210,11 +211,11 @@ dictionary CacheBatchOperation {
}; };
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface CacheStorage { interface CacheStorage {
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options); [NewObject] Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
Promise<boolean> has(DOMString cacheName); [NewObject] Promise<boolean> has(DOMString cacheName);
Promise<Cache> open(DOMString cacheName); [NewObject] Promise<Cache> open(DOMString cacheName);
Promise<boolean> delete(DOMString cacheName); [NewObject] Promise<boolean> delete(DOMString cacheName);
Promise<sequence<DOMString>> keys(); [NewObject] Promise<sequence<DOMString>> keys();
}; };
partial interface ServiceWorkerRegistration { partial interface ServiceWorkerRegistration {
// e.g. define an API namespace // e.g. define an API namespace
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.xhr; namespace org.w3c.xhr;
// Downloaded from https://raw.githubusercontent.com/whatwg/xhr/master/Overview.src.html
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface XMLHttpRequestEventTarget : EventTarget { interface XMLHttpRequestEventTarget : EventTarget {
// event handlers // event handlers
@@ -69,6 +69,7 @@ fun main(args: Array<String>) {
val (url) = pair val (url) = pair
println("Loading ${url}...") println("Loading ${url}...")
w.appendln("// Downloaded from $url")
if (url.endsWith(".idl")) { if (url.endsWith(".idl")) {
w.appendln(URL(url).readText()) w.appendln(URL(url).readText())
} else { } else {