Open smarinier opened 2 years ago
In an iOS application (using cordova), the XMLHTTPRequest doesn't work, as the iOS Web view forbids external queries, aso...
My workaround (and advice) is to use the same strategy as the "json!" require plugins, wich uses the "text!" plugins. This looks like :
define(['module', 'text'], function(module, text){ 'use strict'; var fetchContent = null, moduleVersion = '1.1.5', masterConfig = { isBuild: false, currentImport: '' }, buildMap = {}; if (typeof window !== 'undefined' && window.document){ fetchContent = function(url, callback){ // use "text" module text.get(url, function (data) { callback(data); }); };
} else {
Thanks for the insight, will investigate case locally and push update if needed.
In an iOS application (using cordova), the XMLHTTPRequest doesn't work, as the iOS Web view forbids external queries, aso...
My workaround (and advice) is to use the same strategy as the "json!" require plugins, wich uses the "text!" plugins. This looks like :
} else {