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-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 1f2a718 URLStream: Add function for creating HMLHttpRequest to helps
extend URLStream
1f2a718 is described below
commit 1f2a718c723754c220efe594a70851ae72da87dd
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Fri Aug 7 11:56:52 2020 +0200
URLStream: Add function for creating HMLHttpRequest to helps extend
URLStream
---
.../Network/src/main/royale/org/apache/royale/net/URLStream.as | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLStream.as
b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLStream.as
index 92e0273..e5e3671 100644
---
a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLStream.as
+++
b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLStream.as
@@ -115,7 +115,8 @@ package org.apache.royale.net
{
COMPILE::JS {
requestStatus = 0;
- xhr = new XMLHttpRequest();
+ createXmlHttpRequest();
+
xhr.open(urlRequest.method, urlRequest.url);
xhr.responseType = "arraybuffer";
xhr.addEventListener("readystatechange",
xhr_onreadystatechange,false);
@@ -174,6 +175,12 @@ package org.apache.royale.net
flashUrlStream.load(req);
}
}
+
+ protected function createXmlHttpRequest():void
+ {
+ xhr = new XMLHttpRequest();
+ }
+
/**
* send is a protected function in js so a subclass can attach
an upload listener
* without rewriting the whole load() function