Browse Source

Add js.Lib.typeof.

Bruno Garcia 13 years ago
parent
commit
587e07dc48
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/js/Lib.hx

+ 4 - 0
std/js/Lib.hx

@@ -42,6 +42,10 @@ class Lib {
 		return untyped __js__("eval")(code);
 	}
 
+	public static inline function typeof( code : String ) : String {
+		return untyped __js__("typeof")(code);
+	}
+
 	public static function setErrorHandler( f ) {
 		onerror = f;
 	}