Created
October 23, 2011 14:27
-
-
Save Reinmar/1307416 to your computer and use it in GitHub Desktop.
Stupid DOM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ 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