From 45ced343af841f6a785554a7dde41a99a3a67185 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 11 Aug 2015 12:14:18 +0100 Subject: Add urlutils IDL --- javascript/WebIDL/Makefile | 4 +++ javascript/WebIDL/urlutils.idl | 65 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 javascript/WebIDL/urlutils.idl (limited to 'javascript/WebIDL') 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 getAll(USVString name); + boolean has(USVString name); + void set(USVString name, USVString value); + iterable; + stringifier; +}; + + -- cgit v1.2.3