|
@@ -31,7 +31,7 @@ class Lib {
|
|
|
Inserts a 'debugger' statement that will make a breakpoint if a debugger is available.
|
|
|
**/
|
|
|
public static inline function debug() {
|
|
|
- untyped __js__("debugger");
|
|
|
+ js.Syntax.code("debugger");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -40,11 +40,11 @@ class Lib {
|
|
|
**/
|
|
|
@:deprecated("Lib.alert() is deprecated, use Browser.alert() instead")
|
|
|
public static function alert(v:Dynamic) {
|
|
|
- untyped __js__("alert")(js.Boot.__string_rec(v, ""));
|
|
|
+ js.Syntax.code("alert")(@:privateAccess js.Boot.__string_rec(v, ""));
|
|
|
}
|
|
|
|
|
|
public static inline function eval(code:String):Dynamic {
|
|
|
- return untyped __js__("eval")(code);
|
|
|
+ return js.Syntax.code("eval")(code);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -55,7 +55,19 @@ class Lib {
|
|
|
is available, such as Node.js or RequireJS.
|
|
|
**/
|
|
|
extern public static inline function require(module:String):Dynamic {
|
|
|
- return untyped __js__("require")(module);
|
|
|
+ return js.Syntax.code("require")(module);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ Native JavaScript `parseInt` function.
|
|
|
+
|
|
|
+ Its specification is different from `Std.parseInt`, so one
|
|
|
+ might want to access the native one.
|
|
|
+ **/
|
|
|
+ public static var parseInt(get, never):(string:String, ?radix:Int) -> Float;
|
|
|
+
|
|
|
+ extern static inline function get_parseInt():(string:String, ?radix:Int) -> Float {
|
|
|
+ return js.Syntax.code("parseInt");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -68,7 +80,7 @@ class Lib {
|
|
|
public static var undefined(get, never):Dynamic;
|
|
|
|
|
|
static inline function get_undefined():Dynamic {
|
|
|
- return untyped __js__("undefined");
|
|
|
+ return js.Syntax.code("undefined");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -86,7 +98,7 @@ class Lib {
|
|
|
public static var nativeThis(get, never):Dynamic;
|
|
|
|
|
|
extern static inline function get_nativeThis():Dynamic {
|
|
|
- return untyped __js__("this");
|
|
|
+ return js.Syntax.code("this");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -108,7 +120,7 @@ class Lib {
|
|
|
public static var global(get, never):Dynamic;
|
|
|
|
|
|
extern static inline function get_global():Dynamic {
|
|
|
- return untyped __define_feature__("js.Lib.global", __js__("$global")); // $global is generated by the compiler
|
|
|
+ return untyped __define_feature__("js.Lib.global", js.Syntax.code("$global")); // $global is generated by the compiler
|
|
|
}
|
|
|
|
|
|
/**
|