From b86883a7cce7d982c3f0d0069332dd490331e630 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 11 Aug 2015 14:32:54 +0100 Subject: Extend WebIDL parsing to cope with second edition IDL static interface elements --- test/data/idl/urlutils.idl | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/data/idl/urlutils.idl (limited to 'test/data/idl/urlutils.idl') diff --git a/test/data/idl/urlutils.idl b/test/data/idl/urlutils.idl new file mode 100644 index 0000000..e79d4ad --- /dev/null +++ b/test/data/idl/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