-
-
Save mattmccray/4093239 to your computer and use it in GitHub Desktop.
Stupid Haxe Tricks
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
| package j; | |
| import jQuery.JQuery; | |
| // Usage: | |
| // j.Q.uery('div'); | |
| class Q { | |
| public static inline function uery(selector:Dynamic, ?context:Dynamic): JQuery { | |
| // This will prevent unnecessary `new` keywords in the javascript output. | |
| return (untyped __js__("jQuery"))(selector, context); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment