Quellcode durchsuchen

Remove String.fromCodePoint polyfill for es6 (#11713)

RblSb vor 1 Jahr
Ursprung
Commit
5bb151ae18
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      std/js/_std/String.hx

+ 2 - 0
std/js/_std/String.hx

@@ -44,8 +44,10 @@
 		return untyped __define_feature__('String.fromCharCode', js.Syntax.code("String.fromCodePoint({0})", code));
 	}
 
+	#if (js_es <= 5)
 	static function __init__():Void {
 		untyped __feature__('String.fromCharCode',
 			js.Syntax.code("if( String.fromCodePoint == null ) String.fromCodePoint = function(c) { return c < 0x10000 ? String.fromCharCode(c) : String.fromCharCode((c>>10)+0xD7C0)+String.fromCharCode((c&0x3FF)+0xDC00); }"));
 	}
+	#end
 }