我的应用投掷:
创建应用无法在本地环境中加载远程网络内容
DOM
元素时出现错误。我正在执行MSApp.execUnsafeLocalFunction
以下是一段代码
loadScript: function (a) {
var b = document.createElement("script");
var hellRet = b;
MSApp.execUnsafeLocalFunction(function () {
var b = hellRet;
return b.type = "text/javascript",
b.src = a, // **throwing the error when setting the URL http://example.com/api/v2/viz/ddddd/viz.json?callback=vizjson**
b.async = !0, c.head || (c.head = document.getElementsByTagName("head")[0]), setTimeout(function () {
c.head.appendChild(b)
}, 0), b
});
}
环境:VS 2013,Cordova 5.3.3