Created
January 19, 2012 11:33
-
-
Save skial/1639516 to your computer and use it in GitHub Desktop.
normal haxe/javascript class.__init__ output compared to custom haxe/javascript class.__init__ output
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
| // normal haxe/javascript output for class.__init__ methods | |
| { | |
| js.Lib.document = document; | |
| js.Lib.window = window; | |
| onerror = function(msg,url,line) { | |
| var f = js.Lib.onerror; | |
| if( f == null ) | |
| return false; | |
| return f(msg,[url+":"+line]); | |
| } | |
| } | |
| { | |
| var hello = "sk"; | |
| var i = 1; | |
| } | |
| // odd custom haxe/javascript output for class.__init__ methods | |
| (function($this) { | |
| var $r; | |
| js.Lib.document = document; | |
| js.Lib.window = window; | |
| $r = onerror = function(msg,url,line) { | |
| var f = js.Lib.onerror; | |
| if( f == null ) | |
| return false; | |
| return f(msg,[url+":"+line]); | |
| } | |
| return $r; | |
| }(this)); | |
| (function($this) { | |
| var $r; | |
| var hello = "sk"; | |
| $r = (function($this) { | |
| var $r; | |
| var i = 1; | |
| return $r; | |
| }($this)); | |
| return $r; | |
| }(this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment