oracle / cordova-plugin-wkwebview-file-xhr

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

Mis-parse of relative paths. Alway based-on “www/“ instead of the HTML page. #46

Closed jammind closed 4 years ago

jammind commented 5 years ago

Case: In "settings/set.html”, read “settings/data.json” using fetch(). Current situation: Fetching “data.json” will get an error. I have to fetch “settings/data.json” to make it work. Supposed: I should be able to fetch "data.json" directly since they are in the same folder.

It caused many bugs with dynamically loaded resources.

manish2788 commented 4 years ago

@jammind Hi Jam, We will analyse the reported the issue and get back to you.

manish2788 commented 4 years ago

Hi Jam, This is doesn't seems to be plugin issue. Plugin follows similar standards of web development, the context root is place where the index.html page lives which is the app bundle and www folder. You need to map your files accordingly.