Nicolas Cannasse пре 10 година
родитељ
комит
1bb6730263
1 измењених фајлова са 5 додато и 4 уклоњено
  1. 5 4
      std/js/JQuery.hx

+ 5 - 4
std/js/JQuery.hx

@@ -65,10 +65,11 @@ typedef JqEvent = {
 extern class JQueryHelper {
 	@:overload(function(j:JQuery):JQuery{})
 	@:overload(function(j:DOMWindow):JQuery{})
-	@:overload(function(j:Element):JQuery{})
-	public static inline function J( html : String ) : JQuery {
-		return new JQuery(html);
-	}
+	@:overload(function(j:Element):JQuery { } )
+
+	public static inline function J( html : haxe.EitherType<String,haxe.EitherType<JQuery,haxe.EitherType<DOMWindow,Element>>> ) : JQuery {
+        return new JQuery(cast html);
+    }
 
 	public static var JTHIS(get, null) : JQuery;