requestAnimationFrame with this keyword

后端 未结 7 803
感动是毒
感动是毒 2020-11-27 15:40

I\'m using webkitRequestAnimationFrame but I\'m having trouble using it inside of an object. If I pass the this keyword it will use window

相关标签:
7条回答
  • 2020-11-27 16:26

    And also you might want to use requestAnimationFrame shim to make it work on all browsers https://github.com/kof/animation-frame

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题