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;
// 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
*
+1
View File
@@ -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;
+1
View File
@@ -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;
+5
View File
@@ -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);
+1
View File
@@ -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);
+1
View File
@@ -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;
+1
View File
@@ -1,6 +1,7 @@
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;
[Constructor(optional HeadersInit init),
Exposed=(Window,Worker)]
+1
View File
@@ -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;
+1
View File
@@ -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();
};
+1
View File
@@ -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 {
+2
View File
@@ -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;
+1
View File
@@ -1,6 +1,7 @@
namespace org.w3c.vibration;
// Downloaded from http://www.w3.org/TR/vibration/
typedef (unsigned long or sequence<unsigned long>) VibratePattern; partial interface Navigator {
boolean vibrate (VibratePattern pattern);
};
+39 -38
View File
@@ -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<boolean> unregister();
[NewObject] Promise<boolean> 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<ServiceWorkerRegistration> ready;
[Unforgeable, SameObject] readonly attribute ServiceWorker? controller;
[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 = "");
Promise<sequence<ServiceWorkerRegistration>?> getRegistrations();
[NewObject] Promise<ServiceWorkerRegistration> getRegistration(optional USVString clientURL = "");
[NewObject] Promise<sequence<ServiceWorkerRegistration>?> 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<MessagePort>? 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<void> skipWaiting();
[NewObject] Promise<void> 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<WindowClient> focus();
[NewObject] Promise<WindowClient> focus();
};
enum FrameType {
@@ -121,9 +122,9 @@ enum FrameType {
[Exposed=ServiceWorker]
interface Clients {
// The objects returned will be new instances every time
Promise<sequence<Client>?> matchAll(optional ClientQueryOptions options);
Promise<WindowClient> openWindow(USVString url);
Promise<void> claim();
[NewObject] Promise<sequence<Client>?> matchAll(optional ClientQueryOptions options);
[NewObject] Promise<WindowClient> openWindow(USVString url);
[NewObject] Promise<void> 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<Response>) 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<MessagePort>? portsArg);
};
@@ -178,21 +179,21 @@ dictionary ExtendableMessageEventInit : ExtendableEventInit {
sequence<MessagePort> 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<Response> match(RequestInfo request, optional CacheQueryOptions options);
Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
Promise<void> add(RequestInfo request);
Promise<void> addAll(sequence<RequestInfo> requests);
Promise<void> put(RequestInfo request, Response response);
Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise<void> add(RequestInfo request);
[NewObject] Promise<void> addAll(sequence<RequestInfo> requests);
[NewObject] Promise<void> put(RequestInfo request, Response response);
[NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
};
dictionary CacheQueryOptions {
@@ -210,11 +211,11 @@ dictionary CacheBatchOperation {
};
[Exposed=(Window,Worker)]
interface CacheStorage {
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
Promise<boolean> has(DOMString cacheName);
Promise<Cache> open(DOMString cacheName);
Promise<boolean> delete(DOMString cacheName);
Promise<sequence<DOMString>> keys();
[NewObject] Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[NewObject] Promise<boolean> has(DOMString cacheName);
[NewObject] Promise<Cache> open(DOMString cacheName);
[NewObject] Promise<boolean> delete(DOMString cacheName);
[NewObject] Promise<sequence<DOMString>> keys();
};
partial interface ServiceWorkerRegistration {
// e.g. define an API namespace
+1
View File
@@ -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
@@ -69,6 +69,7 @@ fun main(args: Array<String>) {
val (url) = pair
println("Loading ${url}...")
w.appendln("// Downloaded from $url")
if (url.endsWith(".idl")) {
w.appendln(URL(url).readText())
} else {