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
webkitRequestAnimationFrame
this
window
Beside bind method, and arrow function solution (offered by Jamaes World's answer), Another (rather old) work around could be:
bind
var self = this window.webkitRequestAnimationFrame( function() { self.draw() } );