Nicolas Cannasse 19 роки тому
батько
коміт
13abc82265
3 змінених файлів з 8 додано та 8 видалено
  1. 4 4
      std/Std.hx
  2. 2 2
      std/StringTools.hx
  3. 2 2
      std/js/Lib.hx

+ 4 - 4
std/Std.hx

@@ -67,7 +67,7 @@ class Std {
 		#else neko
 		__dollar__int(x.__s);
 		#else js
-		__top__parseInt(x);
+		__js__("parseInt")(x);
 		#else error
 		#end
 	}
@@ -79,7 +79,7 @@ class Std {
 		#else neko
 		__dollar__float(x.__s);
 		#else js
-		__top__parseFloat(x);
+		__js__("parseFloat")(x);
 		#else error
 		#end
 	}
@@ -130,7 +130,7 @@ class Std {
 		#else neko
 		!__dollar__isinfinite(i);
 		#else js
-		__top__isFinite(i);
+		__js__("isFinite")(i);
 		#else error
 		#end
 	}
@@ -142,7 +142,7 @@ class Std {
 		#else neko
 		__dollar__isnan(i);
 		#else js
-		__top__isNaN(i);
+		__js__("isNaN")(i);
 		#else error
 		#end
 	}

+ 2 - 2
std/StringTools.hx

@@ -31,7 +31,7 @@ class StringTools {
 		#else neko
 		return new String(_urlEncode(untyped s.__s));
 		#else js
-		return untyped __top__encodeURI(s);
+		return untyped encodeURI(s);
 		#else error
 		#end
 	}
@@ -42,7 +42,7 @@ class StringTools {
 		#else neko
 		return new String(_urlDecode(untyped s.__s));
 		#else js
-		return untyped __top__decodeURI(s);
+		return untyped decodeURI(s);
 		#else error
 		#end
 	}

+ 2 - 2
std/js/Lib.hx

@@ -29,11 +29,11 @@ class Lib {
 	public static var isIE = untyped (document.all != null);
 
 	public static function alert( v : Dynamic ) {
-		untyped __top__alert(js.Boot.__string_rec(v,""));
+		untyped __js__("alert")(js.Boot.__string_rec(v,""));
 	}
 
 	public static function setErrorHandler( f : String -> String -> Int -> Bool ) {
-		untyped __top__onerror = f;
+		untyped onerror = f;
 	}
 
 	public static function defaultHandler( msg : String, url : String, line : Int ) {