فهرست منبع

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,""));
 	}