diff --git a/std/haxe/unit/TestRunner.hx b/std/haxe/unit/TestRunner.hx index 3333bfe..e30bd2b 100644 --- a/std/haxe/unit/TestRunner.hx +++ b/std/haxe/unit/TestRunner.hx @@ -76,18 +76,18 @@ class TestRunner { #elseif js var msg = js.Boot.__string_rec(v,""); var d; - if( __js__("typeof")(document) != "undefined" + if( js.Syntax.code("typeof")(document) != "undefined" && (d = document.getElementById("haxe:trace")) != null ) { msg = StringTools.htmlEscape(msg).split("\n").join("
"); d.innerHTML += msg+"
"; } - else if ( __js__("typeof process") != "undefined" - && __js__("process").stdout != null - && __js__("process").stdout.write != null) - __js__("process").stdout.write(msg); // node - else if ( __js__("typeof console") != "undefined" - && __js__("console").log != null ) - __js__("console").log(msg); // document-less js (which may include a line break) + else if ( js.Syntax.code("typeof process") != "undefined" + && js.Syntax.code("process").stdout != null + && js.Syntax.code("process").stdout.write != null) + js.Syntax.code("process").stdout.write(msg); // node + else if ( js.Syntax.code("typeof console") != "undefined" + && js.Syntax.code("console").log != null ) + js.Syntax.code("console").log(msg); // document-less js (which may include a line break) #elseif cs cs.system.Console.Write(v); diff --git a/std/haxe/web/Dispatch.hx b/std/haxe/web/Dispatch.hx index 4664b9b..90cee3d 100644 --- a/std/haxe/web/Dispatch.hx +++ b/std/haxe/web/Dispatch.hx @@ -470,7 +470,7 @@ class Dispatch { var c = Type.getClass(obj); var dc = haxe.rtti.Meta.getType(c); var m : Dynamic = dc.dispatchConfig[0]; - if( Std.is(m,String) ) { + if( Std.isOfType(m,String) ) { m = haxe.Unserializer.run(m); dc.dispatchConfig[0] = m; } diff --git a/std/js/JQuery.hx b/std/js/JQuery.hx index 2c2273c..c52ad17 100644 --- a/std/js/JQuery.hx +++ b/std/js/JQuery.hx @@ -404,7 +404,7 @@ extern class JQuery implements ArrayAccess { #error "Haxe no longer bundle third-party JS libraries. Please remove `-D embed-js`. You may download the JS files and use `haxe.macro.Compiler.includeFile`." #end var q : Dynamic = (untyped js.Browser.window).jQuery; - untyped __js__("var js = js || {}"); + untyped js.Syntax.code("var js = js || {}"); js.JQuery = q; __feature__('js.JQuery.iterator', q.fn.iterator = function() return { pos : 0, j : __this__, hasNext : function() return __this__.pos < __this__.j.length, next : function() return $(__this__.j[__this__.pos++]) } diff --git a/std/neko/net/ServerLoop.hx b/std/neko/net/ServerLoop.hx index 07c9853..9c375bd 100644 --- a/std/neko/net/ServerLoop.hx +++ b/std/neko/net/ServerLoop.hx @@ -217,7 +217,7 @@ class ServerLoop { readData(cl); processData(cl); } catch( e : Dynamic ) { - if( !Std.is(e,haxe.io.Eof) ) + if( !Std.isOfType(e,haxe.io.Eof) ) onError(e); closeConnection(cl.sock); } diff --git a/std/neko/net/ThreadRemotingServer.hx b/std/neko/net/ThreadRemotingServer.hx index 471315a..673d2d7 100644 --- a/std/neko/net/ThreadRemotingServer.hx +++ b/std/neko/net/ThreadRemotingServer.hx @@ -58,7 +58,7 @@ class ThreadRemotingServer extends ThreadServer { readClientData(infos); } catch( e : Dynamic ) { t.socks.remove(s); - if( !Std.is(e,haxe.io.Eof) && !Std.is(e,haxe.io.Error) ) + if( !Std.isOfType(e,haxe.io.Eof) && !Std.isOfType(e,haxe.io.Error) ) logError(e); work(doClientDisconnected.bind(s,infos.client)); }