Add urlutils IDL

This commit is contained in:
Vincent Sanders 2015-08-11 12:14:18 +01:00
parent d4f487acf1
commit 45ced343af
2 changed files with 69 additions and 0 deletions

View File

@ -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 $<

View File

@ -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;
};