Browse Source

[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 năm trước cách đây
mục cha
commit
340a8776de
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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()`.
 	**/
-	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));
 	}
 }