当我用requestAnimationFrame以下代码做一些原生支持的动画时:var support = { animationFrame: window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame};support.animationFrame(function() {}); //errorsupport.animationFrame.call(window, function() {}); //right直接打电话给support.animationFrame意志......未捕获的TypeError:非法调用在Chrome中。为什么?
3 回答
12345678_0001
TA贡献1802条经验 获得超5个赞
您还可以使用:
var obj = {
alert: alert.bind(window)
};
obj.alert('I´m an alert!!');
添加回答
举报
0/150
提交
取消