diff --git a/js/js.libraries/src/generated/org.khronos.webgl.kt b/js/js.libraries/src/generated/org.khronos.webgl.kt index ce748ae37bf..f1d3e7315e1 100644 --- a/js/js.libraries/src/generated/org.khronos.webgl.kt +++ b/js/js.libraries/src/generated/org.khronos.webgl.kt @@ -12,6 +12,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.dom.css.kt b/js/js.libraries/src/generated/org.w3c.dom.css.kt index 622b7574e54..c81744f5de6 100644 --- a/js/js.libraries/src/generated/org.w3c.dom.css.kt +++ b/js/js.libraries/src/generated/org.w3c.dom.css.kt @@ -12,6 +12,7 @@ import org.w3c.dom.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.dom.events.kt b/js/js.libraries/src/generated/org.w3c.dom.events.kt index af234aad1fa..9d9f6cddda5 100644 --- a/js/js.libraries/src/generated/org.w3c.dom.events.kt +++ b/js/js.libraries/src/generated/org.w3c.dom.events.kt @@ -12,6 +12,7 @@ import org.w3c.dom.* import org.w3c.dom.css.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.dom.kt b/js/js.libraries/src/generated/org.w3c.dom.kt index bed921e09c6..a5dbd0c823a 100644 --- a/js/js.libraries/src/generated/org.w3c.dom.kt +++ b/js/js.libraries/src/generated/org.w3c.dom.kt @@ -12,6 +12,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* @@ -1060,6 +1061,42 @@ native public interface HTMLAnchorElement : HTMLElement { var shape: String get() = noImpl set(value) = noImpl + var href: String + get() = noImpl + set(value) = noImpl + var origin: String + get() = noImpl + set(value) = noImpl + var protocol: String + get() = noImpl + set(value) = noImpl + var username: String + get() = noImpl + set(value) = noImpl + var password: String + get() = noImpl + set(value) = noImpl + var host: String + get() = noImpl + set(value) = noImpl + var hostname: String + get() = noImpl + set(value) = noImpl + var port: String + get() = noImpl + set(value) = noImpl + var pathname: String + get() = noImpl + set(value) = noImpl + var search: String + get() = noImpl + set(value) = noImpl + var searchParams: URLSearchParams + get() = noImpl + set(value) = noImpl + var hash: String + get() = noImpl + set(value) = noImpl } native public interface HTMLDataElement : HTMLElement { @@ -1751,6 +1788,42 @@ native public interface HTMLAreaElement : HTMLElement { var noHref: Boolean get() = noImpl set(value) = noImpl + var href: String + get() = noImpl + set(value) = noImpl + var origin: String + get() = noImpl + set(value) = noImpl + var protocol: String + get() = noImpl + set(value) = noImpl + var username: String + get() = noImpl + set(value) = noImpl + var password: String + get() = noImpl + set(value) = noImpl + var host: String + get() = noImpl + set(value) = noImpl + var hostname: String + get() = noImpl + set(value) = noImpl + var port: String + get() = noImpl + set(value) = noImpl + var pathname: String + get() = noImpl + set(value) = noImpl + var search: String + get() = noImpl + set(value) = noImpl + var searchParams: URLSearchParams + get() = noImpl + set(value) = noImpl + var hash: String + get() = noImpl + set(value) = noImpl } native public interface HTMLTableElement : HTMLElement { @@ -3455,6 +3528,42 @@ native public interface Location { var ancestorOrigins: Array get() = noImpl set(value) = noImpl + var href: String + get() = noImpl + set(value) = noImpl + var origin: String + get() = noImpl + set(value) = noImpl + var protocol: String + get() = noImpl + set(value) = noImpl + var username: String + get() = noImpl + set(value) = noImpl + var password: String + get() = noImpl + set(value) = noImpl + var host: String + get() = noImpl + set(value) = noImpl + var hostname: String + get() = noImpl + set(value) = noImpl + var port: String + get() = noImpl + set(value) = noImpl + var pathname: String + get() = noImpl + set(value) = noImpl + var search: String + get() = noImpl + set(value) = noImpl + var searchParams: URLSearchParams + get() = noImpl + set(value) = noImpl + var hash: String + get() = noImpl + set(value) = noImpl fun assign(url: String): Unit = noImpl fun replace(url: String): Unit = noImpl fun reload(): Unit = noImpl @@ -3969,6 +4078,33 @@ native public interface WorkerNavigator { } native public interface WorkerLocation { + var href: String + get() = noImpl + set(value) = noImpl + var origin: String + get() = noImpl + set(value) = noImpl + var protocol: String + get() = noImpl + set(value) = noImpl + var host: String + get() = noImpl + set(value) = noImpl + var hostname: String + get() = noImpl + set(value) = noImpl + var port: String + get() = noImpl + set(value) = noImpl + var pathname: String + get() = noImpl + set(value) = noImpl + var search: String + get() = noImpl + set(value) = noImpl + var hash: String + get() = noImpl + set(value) = noImpl } native public interface Storage { diff --git a/js/js.libraries/src/generated/org.w3c.dom.parsing.kt b/js/js.libraries/src/generated/org.w3c.dom.parsing.kt index bfe6f1175e0..6fb2fdb900c 100644 --- a/js/js.libraries/src/generated/org.w3c.dom.parsing.kt +++ b/js/js.libraries/src/generated/org.w3c.dom.parsing.kt @@ -12,6 +12,7 @@ import org.w3c.dom.* import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.dom.svg.kt b/js/js.libraries/src/generated/org.w3c.dom.svg.kt index ad2885cdef0..3080fc52407 100644 --- a/js/js.libraries/src/generated/org.w3c.dom.svg.kt +++ b/js/js.libraries/src/generated/org.w3c.dom.svg.kt @@ -12,6 +12,7 @@ import org.w3c.dom.* import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.dom.url.kt b/js/js.libraries/src/generated/org.w3c.dom.url.kt new file mode 100644 index 00000000000..77eb0b9ed85 --- /dev/null +++ b/js/js.libraries/src/generated/org.w3c.dom.url.kt @@ -0,0 +1,70 @@ +/* + * Generated file + * DO NOT EDIT + * + * See libraries/tools/idl2k for details + */ + +package org.w3c.dom.url + +import org.khronos.webgl.* +import org.w3c.dom.* +import org.w3c.dom.css.* +import org.w3c.dom.events.* +import org.w3c.dom.parsing.* +import org.w3c.dom.svg.* +import org.w3c.fetch.* +import org.w3c.files.* +import org.w3c.notifications.* +import org.w3c.performance.* +import org.w3c.workers.* +import org.w3c.xhr.* + +native public open class URL(url: String, base: String = noImpl) { + var href: String + get() = noImpl + set(value) = noImpl + var origin: String + get() = noImpl + set(value) = noImpl + var protocol: String + get() = noImpl + set(value) = noImpl + var username: String + get() = noImpl + set(value) = noImpl + var password: String + get() = noImpl + set(value) = noImpl + var host: String + get() = noImpl + set(value) = noImpl + var hostname: String + get() = noImpl + set(value) = noImpl + var port: String + get() = noImpl + set(value) = noImpl + var pathname: String + get() = noImpl + set(value) = noImpl + var search: String + get() = noImpl + set(value) = noImpl + var searchParams: URLSearchParams + get() = noImpl + set(value) = noImpl + var hash: String + get() = noImpl + set(value) = noImpl +} + +native public open class URLSearchParams(init: dynamic = "") { + fun append(name: String, value: String): Unit = noImpl + fun delete(name: String): Unit = noImpl + fun get(name: String): String? = noImpl + fun getAll(name: String): Array = noImpl + fun has(name: String): Boolean = noImpl + fun set(name: String, value: String): Unit = noImpl +} + diff --git a/js/js.libraries/src/generated/org.w3c.fetch.kt b/js/js.libraries/src/generated/org.w3c.fetch.kt index 6dce9924cda..57aeab80104 100644 --- a/js/js.libraries/src/generated/org.w3c.fetch.kt +++ b/js/js.libraries/src/generated/org.w3c.fetch.kt @@ -13,6 +13,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.files.* import org.w3c.notifications.* import org.w3c.performance.* diff --git a/js/js.libraries/src/generated/org.w3c.files.kt b/js/js.libraries/src/generated/org.w3c.files.kt index 7a75e445002..8516ed9363f 100644 --- a/js/js.libraries/src/generated/org.w3c.files.kt +++ b/js/js.libraries/src/generated/org.w3c.files.kt @@ -13,6 +13,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.notifications.* import org.w3c.performance.* @@ -105,6 +106,3 @@ native public open class FileReaderSync { fun readAsDataURL(blob: Blob): String = noImpl } -native public interface URL { -} - diff --git a/js/js.libraries/src/generated/org.w3c.notifications.kt b/js/js.libraries/src/generated/org.w3c.notifications.kt index 103eba05bab..3ce7fd34c49 100644 --- a/js/js.libraries/src/generated/org.w3c.notifications.kt +++ b/js/js.libraries/src/generated/org.w3c.notifications.kt @@ -13,6 +13,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.performance.* diff --git a/js/js.libraries/src/generated/org.w3c.performance.kt b/js/js.libraries/src/generated/org.w3c.performance.kt index b9adeaa62ac..46d051f2b2f 100644 --- a/js/js.libraries/src/generated/org.w3c.performance.kt +++ b/js/js.libraries/src/generated/org.w3c.performance.kt @@ -13,6 +13,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.workers.kt b/js/js.libraries/src/generated/org.w3c.workers.kt index 476998d7df1..ddafd80565a 100644 --- a/js/js.libraries/src/generated/org.w3c.workers.kt +++ b/js/js.libraries/src/generated/org.w3c.workers.kt @@ -13,6 +13,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/js/js.libraries/src/generated/org.w3c.xhr.kt b/js/js.libraries/src/generated/org.w3c.xhr.kt index 63cce9968ec..f0d9c597944 100644 --- a/js/js.libraries/src/generated/org.w3c.xhr.kt +++ b/js/js.libraries/src/generated/org.w3c.xhr.kt @@ -13,6 +13,7 @@ import org.w3c.dom.css.* import org.w3c.dom.events.* import org.w3c.dom.parsing.* import org.w3c.dom.svg.* +import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* import org.w3c.notifications.* diff --git a/libraries/idl/org.w3c.dom.url.idl b/libraries/idl/org.w3c.dom.url.idl new file mode 100644 index 00000000000..99497b80e0e --- /dev/null +++ b/libraries/idl/org.w3c.dom.url.idl @@ -0,0 +1,105 @@ +namespace org.w3c.dom.url; + + +// Downloaded from https://raw.githubusercontent.com/whatwg/url/master/url.html +[Constructor(USVString url, optional USVString base), Exposed=(Window,Worker)] +interface URL { + static USVString domainToASCII(USVString domain); + static USVString domainToUnicode(USVString domain); +}; +URL implements URLUtils; + +[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 URLSearchParams searchParams; + attribute USVString hash; +}; + +[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; +}; +[Constructor(USVString url, optional USVString base), Exposed=(Window,Worker)] +interface URL { + static USVString domainToASCII(USVString domain); + static USVString domainToUnicode(USVString domain); +}; +URL implements URLUtils; + +[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 URLSearchParams searchParams; + attribute USVString hash; +}; + +[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; +}; + diff --git a/libraries/tools/idl2k/src/main/kotlin/config.kt b/libraries/tools/idl2k/src/main/kotlin/config.kt index 3c80867aa85..63b9cb34de5 100644 --- a/libraries/tools/idl2k/src/main/kotlin/config.kt +++ b/libraries/tools/idl2k/src/main/kotlin/config.kt @@ -26,6 +26,7 @@ val urls = listOf( "http://www.w3.org/TR/uievents/" to "org.w3c.dom.events", "http://dev.w3.org/csswg/cssom/" to "org.w3c.dom.css", "http://www.w3.org/TR/DOM-Parsing/" to "org.w3c.dom.parsing", + "https://raw.githubusercontent.com/whatwg/url/master/url.html" to "org.w3c.dom.url", "http://web.archive.org/web/20150317051602/http://www.w3.org/TR/SVG11/single-page.html" to "org.w3c.dom.svg", "https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl" to "org.khronos.webgl",