oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 120 forks source link

Support For Synchronous Requests #65

Closed AareFabrik closed 3 years ago

AareFabrik commented 3 years ago

This plugin apparently does not support synchronous XHRequests.

Is this planned to be implemented?

I depend on a third party library which is using following synchronous Request:

var req = new XMLHttpRequest;
req.addEventListener("load", function(r) {
    ...
});
t.addEventListener("error", function(t) {
    ...
});
t.open("GET", url, false); // false is for async boolean

Or any hints how to do this?

facetbarcelona commented 3 years ago

The following plugin has done the trick for me (I do synchronous requests for local resources): https://github.com/TheMattRay/cordova-plugin-wkwebviewxhrfix

I hope this helps.

AareFabrik commented 3 years ago

Hello, thanks for the answer. We finally finished with the same fork as you mentioned. Hopefully it helps others to find it quicker.

manish2788 commented 3 years ago

@AareFabrik We don't have any plan to support synchronous requests for local resources in near future considering Synchronous XHR is now in deprecation state.