You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/23 08:21:16 UTC

[GitHub] [cordova-plugin-file] vitto32 edited a comment on issue #352: Accessing cdvfile:// from http://[network-url] in ajax throws CORS policy error on Android

vitto32 edited a comment on issue #352: Accessing cdvfile:// from http://[network-url] in ajax throws CORS policy error on Android
URL: https://github.com/apache/cordova-plugin-file/issues/352#issuecomment-545327944
 
 
   Finally I opted for the script embedding mechanism:
   - while writing the json during the download operation, I wrap it in a function call `window.__loadJSON(filePath, [json-content]);` 
   - When I need it I register a callback bound to `filePath` and I load it using a script tag 
   - `__loadJSON` triggers the callback
   
   it's still slow (I assume it's my device) and ugly. But it's a little faster then the read implementation and probably more solid.
   
   It's silly I can load and run a fully functional script but I can't load a simple object from the same source / protocol.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org