Open translace opened 3 years ago
游戏是cocos 2.3.2引擎,打包后rpk调试报错ActiveXObject is not defined,该错误由cocos2d-runtime.js引起,但该套源码转到oppo和小米均能正常运行。
ActiveXObject在cocos2d-runtime.js内的定义:
v.getXMLHttpRequest = function () { return window.XMLHttpRequest ? new window.XMLHttpRequest : new ActiveXObject("MSXML2.XMLHTTP") } ... ... cc.SAXParser.prototype = { constructor: cc.SAXParser, parse: function (t) { return this._parseXML(t) }, _parseXML: function (t) { var e; return this._isSupportDOMParser ? e = this._parser.parseFromString(t, "text/xml") : ((e = new ActiveXObject("Microsoft.XMLDOM")).async = "false", e.loadXML(t)), e } }
游戏是cocos 2.3.2引擎,打包后rpk调试报错ActiveXObject is not defined,该错误由cocos2d-runtime.js引起,但该套源码转到oppo和小米均能正常运行。
ActiveXObject在cocos2d-runtime.js内的定义: