Amir Rezai 5 năm trước cách đây
mục cha
commit
2e6c88c3b0
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      hxd/res/Embed.hx

+ 4 - 0
hxd/res/Embed.hx

@@ -104,7 +104,11 @@ class Embed {
 
 	#if js
 	static function __init__() untyped {
+		#if (haxe_ver >= 4)
+		js.Syntax.code("var hx__registerFont");
+		#else
 		__js__("var hx__registerFont");
+		#end
 		untyped hx__registerFont = function(name, data) {
 			var s = js.Browser.document.createStyleElement();
 			s.type = "text/css";