11 javascript
我必须在下面的方法中使用bind().我只想支持IE10及以上版本.任何人都可以验证IE10何时或是否支持bind()?
// Verify console exists
...
if (window.console) {
logger = window.console.log.bind(window.console);
// bind needed for Safari but not FF, possible IE issue?
} else {
return false; // window.console not available, silent fail
}
...
Run Code Online (Sandbox Code Playgroud)