- Creator 版本:2.3.3
大意:
百度手机浏览器的傻逼开发修改了 Array.indexOf 方法, 不按规范做,把严格等改成了非严格等, 还忽略了这个api的第二个参数
源码:
CocosDashboard_1.0.6\resources.editors\Creator\2.3.3\resources\engine\cocos2d\core\platform\js.js
801 - 805 行
/**
- Exact same function as Array.prototype.indexOf.
- HACK: ugliy hack for Baidu mobile browser compatibility, stupid Baidu guys modify Array.prototype.indexOf for all pages loaded, their version changes strict comparison to non-strict comparison, it also ignores the second parameter of the original API, and this will cause event handler enter infinite loop.
- Baidu developers, if you ever see this documentation, here is the standard: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf, Seriously!