Nicolas Cannasse преди 1 година
родител
ревизия
37ad318a9b
променени са 5 файла, в които са добавени 15 реда и са изтрити 5 реда
  1. 2 1
      .gitignore
  2. 3 3
      hide/Element.hx
  3. 1 1
      hide/comp/Component.hx
  4. 7 0
      hide/ui/QueryHelper.hx
  5. 2 0
      hide_rt.hxml

+ 2 - 1
.gitignore

@@ -14,4 +14,5 @@
 /bin/swiftshader
 /bin/swiftshader
 /bin/*.bin
 /bin/*.bin
 /bin/credits.html
 /bin/credits.html
-/bin/icudtl.dat
+/bin/icudtl.dat
+*.hl

+ 3 - 3
hide/Element.hx

@@ -1,8 +1,8 @@
 package hide;
 package hide;
 
 
-typedef Element = #if hl hide.tools.vdom.JQuery #else js.jquery.JQuery #end;
-typedef Event = #if hl hide.tools.vdom.Event #else js.jquery.Event #end;
-typedef HTMLElement = #if hl hide.tools.vdom.Dom #else js.html.Element #end;
+typedef Element = #if hl hltml.JQuery #else js.jquery.JQuery #end;
+typedef Event = #if hl hltml.Event #else js.jquery.Event #end;
+typedef HTMLElement = #if hl hltml.Dom #else js.html.Element #end;
 
 
 function getVal( e : Element ) {
 function getVal( e : Element ) {
 	return #if js e.val() #else e.getValue() #end;
 	return #if js e.val() #else e.getValue() #end;

+ 1 - 1
hide/comp/Component.hx

@@ -20,7 +20,7 @@ class Component {
 		element.remove();
 		element.remove();
 	}
 	}
 
 
-	@:final function get_componentName() return Type.getClassName(Type.getClass(this));
+	final function get_componentName() return Type.getClassName(Type.getClass(this));
 
 
 	function getDisplayState( key : String ) : Dynamic {
 	function getDisplayState( key : String ) : Dynamic {
 		if( saveDisplayKey == null )
 		if( saveDisplayKey == null )

+ 7 - 0
hide/ui/QueryHelper.hx

@@ -0,0 +1,7 @@
+package hide.ui;
+
+#if js extern #end class QueryHelper {
+	macro public static function J(exprs:Array<haxe.macro.Expr>) {
+		return macro new hide.Element($a{exprs});
+	}
+}

+ 2 - 0
hide_rt.hxml

@@ -2,6 +2,8 @@
 -lib heaps
 -lib heaps
 -lib hide
 -lib hide
 -lib castle
 -lib castle
+-lib hscript
+-D hscriptPos
 --remap hide:notAllowed
 --remap hide:notAllowed
 --macro include("hrt")
 --macro include("hrt")
 -D no-compilation
 -D no-compilation