From c476a16ad982e778580d74b8e4120ed29118129a Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 20 Jun 2023 23:33:13 +0300 Subject: Scroll to chat end button --- src/client/Utils.hx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client/Utils.hx') diff --git a/src/client/Utils.hx b/src/client/Utils.hx index cdf9f21..a0e19f7 100644 --- a/src/client/Utils.hx +++ b/src/client/Utils.hx @@ -8,6 +8,15 @@ import js.html.Element; import js.html.URL; class Utils { + public static function nativeTrace(msg:Dynamic, ?infos:haxe.PosInfos):Void { + final fileData = '${infos.fileName}:${infos.lineNumber}'; + var args:Array = [fileData, msg]; + if (infos.customParams != null) args = args.concat(infos.customParams); + js.Browser.window.console.log( + ...haxe.Rest.of(args) + ); + } + public static function isTouch():Bool { return js.Syntax.code("'ontouchstart' in window"); } -- cgit v1.2.3