View Full Version : shim layer for bind()

08-30-2011, 05:01 AM
I have a script that runs a sprite animation on the canvas, adapted from here: http://www.kadrmasconcepts.com/blog/2011/05/27/sprite-sheets-reloaded-canvas-style/. After wondering why it wouldn't work on Safari or older versions of Firefox, I saw this: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind and implemented the suggested shim.

However, I'm still getting some errors that I can't explain for the life of me. To make this easy for everyone, I threw it in a jsfiddle: http://jsfiddle.net/zachgold/AL3AQ/. Any help would be appreciated.



08-30-2011, 11:26 PM
Anyone? This surely must be a common problem with those doing HTML5 stuff. I even put it in jsfiddle to make it super easy :(