Просмотр исходного кода

[js] inline js.Browser.alert and use Std.string because it's optimized by compiler in sane cases (see #8181)

not sure why the parameter is Dynamic there though, but okay
Dan Korostelev 6 лет назад
Родитель
Сommit
340a8776de
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      std/js/Browser.hx

+ 2 - 2
std/js/Browser.hx

@@ -112,7 +112,7 @@ class Browser {
 	/**
 	/**
 		Display an alert message box containing the given message. See also `Window.alert()`.
 		Display an alert message box containing the given message. See also `Window.alert()`.
 	**/
 	**/
-	public static function alert( v : Dynamic ) {
-		@:privateAccess window.alert(Boot.__string_rec(v,""));
+	public static inline function alert( v : Dynamic ) {
+		window.alert(Std.string(v));
 	}
 	}
 }
 }