oracle / cordova-plugin-wkwebview-file-xhr

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

Just a precision about the JS code #81

Closed nbrignol closed 3 years ago

nbrignol commented 3 years ago

Not a problem, just a precision : The "responseText" will be available on the "this" in the event callback only, and no more in the event.target itself (like it is in classic XHR).

I guess you should note it in the doc. Thank about that plugin BTW !

xhr.addEventListener("loadend", function(evt) {
   //var data = evt.target.responseText; //<-- this will not work with the plugin 
   var data = this.responseText; //<-- this works
   document.getElementById("myregion").innerHTML = data;
 });
manish2788 commented 3 years ago

Thanks @nbrignol . We will make a note of your feedback.