Skip to content

Commit 2451db1

Browse files
committed
Changes for v3.0.0
1 parent 9212243 commit 2451db1

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Change Log
2+
## cordova-plugin-wkwebview-file-xhr v3.0.0 (09/09/2020)
3+
* Upgraded to support cordova-ios 6.0 by removing dependency from wkwebview engine. (issue #55)
4+
* Fix HEADERS_RECEIVED const typo (issue #37).
5+
26
## cordova-plugin-wkwebview-file-xhr v2.1.3 (11/22/2019)
37
* Rectifcation of Object.toString incorrect behavior with FormData polyfil (issue #39).
48
* Fix for double encoding of URL UTF-8 params (issue #41).
59

610
## cordova-plugin-wkwebovew-file-xhr v2.1.2 (10/22/2019)
711
* Support for xhr content served from application data directory in addition to the application package . (issue #45)
8-
* Simulating file not found condition was firing the HEADERS_RECIEVED ready state change before setting the response status code (issue #33)
12+
* Simulating file not found condition was firing the HEADERS_RECEIVED ready state change before setting the response status code (issue #33)
913

1014
## cordova-plugin-wkwebview-file-xhr v2.1.1 (01/18/2018)
1115
* XMLHttpRequest setRequestHeader normalizes the value pair to string types (issue #13).

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cordova-plugin-wkwebview-file-xhr 2.1.4
1+
# cordova-plugin-wkwebview-file-xhr 3.0.0
22

33
## About the cordova-plugin-wkwebview-file-xhr
44

@@ -16,6 +16,12 @@ Plugin installation requires Cordova 4+ and iOS 9+. It will install the Apache C
1616
cordova plugin add cordova-plugin-wkwebview-file-xhr
1717
```
1818

19+
Note : If your cordova-ios version is less than 6.0.0. You need to add following dependency to plugin.xml
20+
```
21+
<dependency id="cordova-plugin-wkwebview-engine" />
22+
```
23+
Alternatively you can use this plugin's version 2.1.4
24+
1925
## Supported Platforms
2026

2127
* iOS
@@ -28,7 +34,7 @@ var xhr = new XMLHttpRequest();
2834
xhr.addEventListener("loadend", function(evt)
2935
{
3036
var data = this.responseText;
31-
document.getElementById("myregion").innerHtml = data;
37+
document.getElementById("myregion").innerHTML = data;
3238
});
3339

3440
xhr.open("GET", "js/views/customers.html");

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-wkwebview-file-xhr",
3-
"version": "2.1.4",
3+
"version": "3.0.0",
44
"description": "Cordova WKWebView File XHR Plugin",
55
"cordova": {
66
"id": "cordova-plugin-wkwebview-file-xhr",

plugin.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121

2222
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2323
id="cordova-plugin-wkwebview-file-xhr"
24-
version="2.1.4">
24+
version="3.0.0">
2525
<name>Cordova WKWebView File XHR Plugin</name>
2626
<description>This plugin includes the Apache Cordova WKWebView plugin and resolves XHR Cross-Origin Resource Sharing (CORS) constraints.</description>
2727
<license>UPL 1.0</license>
2828
<keywords>cordova,wkwebview,webview</keywords>
2929
<repo>https://github.com/oracle/cordova-plugin-wkwebview-file-xhr.git</repo>
30-
<dependency id="cordova-plugin-wkwebview-engine" />
3130
<engines>
3231
<engine name="cordova-ios" version=">=4.0.0" />
3332
<engine name="apple-ios" version=">=9.0" />

src/www/ios/xhr-polyfill.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
reqContext.status = 404;
191191
reqContext.responseText = "File Not Found";
192192

193-
reqContext.dispatchReadyStateChangeEvent(2); // HEADERS_RECIEVED
193+
reqContext.dispatchReadyStateChangeEvent(2); // HEADERS_RECEIVED
194194
reqContext.dispatchReadyStateChangeEvent(3); // LOADING
195195
reqContext.dispatchProgressEvent("progress");
196196

@@ -215,7 +215,7 @@
215215
reqContext.statusText = "OK";
216216
reqContext.responseURL = reqContext.url;
217217

218-
reqContext.dispatchReadyStateChangeEvent(2); // HEADERS_RECIEVED
218+
reqContext.dispatchReadyStateChangeEvent(2); // HEADERS_RECEIVED
219219
reqContext.dispatchReadyStateChangeEvent(3); // LOADING
220220
reqContext.dispatchProgressEvent("progress", respSize);
221221
reqContext.dispatchReadyStateChangeEvent(4); // DONE
@@ -654,7 +654,7 @@
654654

655655
var respSize = rspTypeHandler.responseSize();
656656

657-
reqContext.dispatchReadyStateChangeEvent(2); //HEADERS_RECIEVED
657+
reqContext.dispatchReadyStateChangeEvent(2); //HEADERS_RECEIVED
658658
reqContext.dispatchReadyStateChangeEvent(3); //LOADING
659659
reqContext.dispatchProgressEvent("progress", respSize);
660660
reqContext.dispatchReadyStateChangeEvent(4); //DONE
@@ -679,7 +679,7 @@
679679
reqContext.responseText = error;
680680
}
681681

682-
reqContext.dispatchReadyStateChangeEvent(2); //HEADERS_RECIEVED
682+
reqContext.dispatchReadyStateChangeEvent(2); //HEADERS_RECEIVED
683683
reqContext.dispatchReadyStateChangeEvent(3); //LOADING
684684
reqContext.dispatchProgressEvent("progress");
685685
reqContext.dispatchReadyStateChangeEvent(4); //DONE
@@ -781,7 +781,7 @@
781781
DelegateHandler._readystatechangeEventRelay = function (reqContext, delegate, event)
782782
{
783783

784-
if (delegate.readyState > 1) // readyState gt HEADERS_RECIEVED
784+
if (delegate.readyState > 1) // readyState gt HEADERS_RECEIVED
785785
{
786786
if (Object.keys(reqContext.responseHeaders).length === 0)
787787
DelegateHandler._parseResponseHeaders(delegate, reqContext.responseHeaders);
@@ -1019,7 +1019,7 @@
10191019

10201020

10211021
// define readonly const properties
1022-
["UNSENT", "OPENED", "HEADERS_RECIEVED", "LOADING", "DONE"].forEach(function (propName, i)
1022+
["UNSENT", "OPENED", "HEADERS_RECEIVED", "LOADING", "DONE"].forEach(function (propName, i)
10231023
{
10241024
Object.defineProperty(window.XMLHttpRequest.prototype, propName,
10251025
{

0 commit comments

Comments
 (0)