summaryrefslogtreecommitdiff
path: root/javascript/WebIDL
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-08-11 12:14:18 +0100
committerVincent Sanders <vince@kyllikki.org>2015-08-11 12:14:18 +0100
commit45ced343af841f6a785554a7dde41a99a3a67185 (patch)
treef22557e4e13d956adf520db902af99710a2950a5 /javascript/WebIDL
parentd4f487acf157f14d80d19d586bd6f6869c564523 (diff)
downloadnetsurf-45ced343af841f6a785554a7dde41a99a3a67185.tar.gz
netsurf-45ced343af841f6a785554a7dde41a99a3a67185.tar.bz2
Add urlutils IDL
Diffstat (limited to 'javascript/WebIDL')
-rw-r--r--javascript/WebIDL/Makefile4
-rw-r--r--javascript/WebIDL/urlutils.idl65
2 files changed, 69 insertions, 0 deletions
diff --git a/javascript/WebIDL/Makefile b/javascript/WebIDL/Makefile
index e7647e2a1..6319bbddd 100644
--- a/javascript/WebIDL/Makefile
+++ b/javascript/WebIDL/Makefile
@@ -21,6 +21,7 @@ all: dom.idl html.idl uievents.idl
.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html
.INTERMEDIATE:html-spec.html html-spec.xml html-idl.html
.INTERMEDIATE:uievents-spec.html uievents-spec.xml uievents-idl.html
+.INTERMEDIATE:urlutils-spec.html urlutils-spec.xml urlutils-idl.html
dom-spec.html:
curl -s https://dom.spec.whatwg.org/ -o $@
@@ -31,6 +32,9 @@ html-spec.html:
uievents-spec.html:
curl -s http://www.w3.org/TR/uievents/ -o $@
+urlutils-spec.html:
+ curl -s https://url.spec.whatwg.org/ -o $@
+
%-spec.xml: %-spec.html
-tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure,time,main,nav,svg,rect,text,image,mark,figcaption,section -o $@ -asxml $<
diff --git a/javascript/WebIDL/urlutils.idl b/javascript/WebIDL/urlutils.idl
new file mode 100644
index 000000000..e79d4ad42
--- /dev/null
+++ b/javascript/WebIDL/urlutils.idl
@@ -0,0 +1,65 @@
+// Retrived from https://url.spec.whatwg.org
+// Tue Aug 11 12:11:31 BST 2015
+// Removed duplicate IDL from appendix
+
+[Constructor(USVString url, optional USVString base),
+ Exposed=(Window,Worker)]
+interface URL {
+ static USVString domainToASCII(USVString domain);
+ static USVString domainToUnicode(USVString domain);
+};
+URL implements URLUtils;
+URL implements URLUtilsSearchParams;
+
+[NoInterfaceObject,
+ Exposed=(Window,Worker)]
+interface URLUtils {
+ stringifier attribute USVString href;
+ readonly attribute USVString origin;
+
+ attribute USVString protocol;
+ attribute USVString username;
+ attribute USVString password;
+ attribute USVString host;
+ attribute USVString hostname;
+ attribute USVString port;
+ attribute USVString pathname;
+ attribute USVString search;
+ attribute USVString hash;
+};
+
+[NoInterfaceObject,
+ Exposed=(Window, Worker)]
+interface URLUtilsSearchParams {
+ attribute URLSearchParams searchParams;
+};
+
+[NoInterfaceObject,
+ Exposed=(Window,Worker)]
+interface URLUtilsReadOnly {
+ 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;
+};
+
+[Constructor(optional (USVString or URLSearchParams) init = ""),
+ Exposed=(Window,Worker)]
+interface URLSearchParams {
+ void append(USVString name, USVString value);
+ void delete(USVString name);
+ USVString? get(USVString name);
+ sequence<USVString> getAll(USVString name);
+ boolean has(USVString name);
+ void set(USVString name, USVString value);
+ iterable<USVString, USVString>;
+ stringifier;
+};
+
+