Skip to content

Instantly share code, notes, and snippets.

@Reinmar
Created October 23, 2011 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Reinmar/1307416 to your computer and use it in GitHub Desktop.
Save Reinmar/1307416 to your computer and use it in GitHub Desktop.
Stupid DOM
({ r: window.webkitRequestAnimationFrame }).r(alert.bind(null, 1));
//Uncaught TypeError: Illegal invocation
({ r: window.mozRequestAnimationFrame }).r(alert.bind(null, 1));
//Error: Illegal operation on WrappedNative prototype object
var r = mozRequestAnimationFrame;
r.call(null, alert.bind(null, 1));
//ok, context is not important, so why can't I call DOM methods in whichever I want? :|
//because this is DOM!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment