当我用requestAnimationFrame以下代码做一些原生支持的动画时:
var support = {
animationFrame: window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame
};
support.animationFrame(function() {}); //error
support.animationFrame.call(window, function() {}); //right
直接打电话给support.animationFrame意志......
未捕获的TypeError:非法调用
在Chrome中。为什么?
12345678_0001
相关分类