Hi Adrián,
we only allow injecting scripts that are hosted in the device itself (for security reasons and to make them work in offline mode too). So you should download your script first and then inject it using the local URL.
You can do it easily using our CoreFilepoolProvider. The JS code returned by plugins should have access to that provider:
we only allow injecting scripts that are hosted in the device itself (for security reasons and to make them work in offline mode too). So you should download your script first and then inject it using the local URL.
You can do it easily using our CoreFilepoolProvider. The JS code returned by plugins should have access to that provider:
var that = this; loadOlScript(url) { // Download the file if it isn't downloaded already. return that.CoreFilepoolProvider.downloadUrl(url).then(function(localUrl) { //load script ... }); }Please let me know if this doesn't work for you or you find any other problem 😉
Cheers,
Dani