浏览代码

Add js.Lib.typeof.

Bruno Garcia 13 年之前
父节点
当前提交
587e07dc48
共有 1 个文件被更改,包括 4 次插入0 次删除
  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;
 	}