This is an automated email from the ASF dual-hosted git repository.
piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-typedefs.git
The following commit(s) were added to refs/heads/develop by this push:
new 60300c0 Add missing URLSearchParams API
60300c0 is described below
commit 60300c0379ba83d44fbe72afe978ba1858e1adac
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Tue Jul 9 23:59:00 2019 +0200
Add missing URLSearchParams API
- Revert downloading url.js
---
js/build.xml | 6 --
js/pom.xml | 15 -----
js/src/main/javascript/missing.js | 131 +++++++++++++++++++++++++++++++++++++-
3 files changed, 130 insertions(+), 22 deletions(-)
diff --git a/js/build.xml b/js/build.xml
index ebaa234..2d6c1bb 100644
--- a/js/build.xml
+++ b/js/build.xml
@@ -113,7 +113,6 @@
<get
src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js"
dest="${basedir}/target/downloads/browser/gecko_dom.js" ignoreerrors="true"
skipexisting="false"/>
<get
src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js"
dest="${basedir}/target/downloads/browser/w3c_dom2.js" ignoreerrors="true"
skipexisting="false"/>
<get
src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js"
dest="${basedir}/target/downloads/browser/html5.js" ignoreerrors="true"
skipexisting="false"/>
- <get
src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/url.js"
dest="${basedir}/target/downloads/browser/url.js" ignoreerrors="true"
skipexisting="false"/>
<antcall target="get-from-cache-if-needed" >
<param name="srcFile" value="svg.js" />
<param name="destFile" value="svg.js" />
@@ -154,11 +153,6 @@
<param name="destFile" value="html5.js" />
<param name="destDir" value="${basedir}/target/downloads/browser"
/>
</antcall>
- <antcall target="get-from-cache-if-needed" >
- <param name="srcFile" value="url.js" />
- <param name="destFile" value="url.js" />
- <param name="destDir" value="${basedir}/target/downloads/browser"
/>
- </antcall>
<antcall target="fail-if-not-found" >
<param name="destFile" value="svg.js" />
<param name="destDir" value="${basedir}/target/downloads" />
diff --git a/js/pom.xml b/js/pom.xml
index de8926c..bd41d3f 100644
--- a/js/pom.xml
+++ b/js/pom.xml
@@ -180,20 +180,6 @@
<overwrite>true</overwrite>
</configuration>
</execution>
- <execution>
- <id>get-url</id>
- <phase>validate</phase>
- <goals>
- <goal>wget</goal>
- </goals>
- <configuration>
-
<url>https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/url.js</url>
- <outputFileName>url.js</outputFileName>
-
<outputDirectory>${project.build.directory}/downloads/browser</outputDirectory>
- <skipCache>true</skipCache>
- <overwrite>true</overwrite>
- </configuration>
- </execution>
</executions>
</plugin>
@@ -229,7 +215,6 @@
<include>browser/webgl.js</include>
<include>browser/webstorage.js</include>
<include>browser/whatwg_encoding.js</include>
- <include>browser/url.js</include>
<include>es6_collections.js</include>
</includes>
<excludes>
diff --git a/js/src/main/javascript/missing.js
b/js/src/main/javascript/missing.js
index ccd2455..8869e69 100644
--- a/js/src/main/javascript/missing.js
+++ b/js/src/main/javascript/missing.js
@@ -466,4 +466,133 @@ AnimationEffectTiming.prototype.duration;
AnimationEffectTiming.prototype.direction;
/** @type {string} */
-AnimationEffectTiming.prototype.easing;
\ No newline at end of file
+AnimationEffectTiming.prototype.easing;
+
+/**
+ * @fileoverview Definitions for URL and URLSearchParams from the spec at
+ * https://url.spec.whatwg.org.
+ *
+ * @externs
+ * @author [email protected] (Devlin Cronin)
+ */
+
+/**
+ * @constructor
+ * @implements {Iterable<!Array<string>>}
+ * @param {(string|!URLSearchParams)=} init
+ */
+function URLSearchParams(init) {}
+
+/**
+ * @param {string} name
+ * @param {string} value
+ * @return {undefined}
+ */
+URLSearchParams.prototype.append = function(name, value) {};
+
+/**
+ * @param {string} name
+ * @return {undefined}
+ */
+URLSearchParams.prototype.delete = function(name) {};
+
+/**
+ * @param {string} name
+ * @return {?string}
+ */
+URLSearchParams.prototype.get = function(name) {};
+
+/**
+ * @param {string} name
+ * @return {!Array<string>}
+ */
+URLSearchParams.prototype.getAll = function(name) {};
+
+/**
+ * @param {string} name
+ * @return {boolean}
+ */
+URLSearchParams.prototype.has = function(name) {};
+
+/**
+ * @param {string} name
+ * @param {string} value
+ * @return {undefined}
+ */
+URLSearchParams.prototype.set = function(name, value) {};
+
+/**
+ * @see https://url.spec.whatwg.org
+ * @constructor
+ * @param {string} url
+ * @param {(string|!URL)=} base
+ */
+function URL(url, base) {}
+
+/** @type {string} */
+URL.prototype.href;
+
+/**
+ * @const
+ * @type {string}
+ */
+URL.prototype.origin;
+
+/** @type {string} */
+URL.prototype.protocol;
+
+/** @type {string} */
+URL.prototype.username;
+
+/** @type {string} */
+URL.prototype.password;
+
+/** @type {string} */
+URL.prototype.host;
+
+/** @type {string} */
+URL.prototype.hostname;
+
+/** @type {string} */
+URL.prototype.port;
+
+/** @type {string} */
+URL.prototype.pathname;
+
+/** @type {string} */
+URL.prototype.search;
+
+/**
+ * @const
+ * @type {!URLSearchParams}
+ */
+URL.prototype.searchParams;
+
+/** @type {string} */
+URL.prototype.hash;
+
+/**
+ * @param {string} domain
+ * @return {string}
+ */
+URL.domainToASCII = function(domain) {};
+
+/**
+ * @param {string} domain
+ * @return {string}
+ */
+URL.domainToUnicode = function(domain) {};
+
+/**
+ * @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
+ * @param {!File|!Blob|!MediaSource|!MediaStream} obj
+ * @return {string}
+ */
+URL.createObjectURL = function(obj) {};
+
+/**
+ * @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
+ * @param {string} url
+ * @return {undefined}
+ */
+URL.revokeObjectURL = function(url) {};