소스 검색

added debug()

Nicolas Cannasse 13 년 전
부모
커밋
8bbb1abc73
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      std/js/Lib.hx

+ 10 - 0
std/js/Lib.hx

@@ -34,6 +34,16 @@ class Lib {
 	public static var window : Window;
 	static var onerror : String -> Array<String> -> Bool = null;
 
+	/**
+		Inserts a 'debugger' statement that will make a breakpoint if a debugger is available.
+	**/
+	public static inline function debug() {
+		untyped __js__("debugger");
+	}
+
+	/**
+		Display an alert message box containing the given message
+	**/
 	public static function alert( v : Dynamic ) {
 		untyped __js__("alert")(js.Boot.__string_rec(v,""));
 	}