|
@@ -1761,9 +1761,10 @@ let generate com =
|
|
|
end;
|
|
|
if has_feature ctx "use.$bind" then begin
|
|
|
add_feature ctx "$global.$haxeUID";
|
|
|
- if not has_dollar_underscore then
|
|
|
+ if not has_dollar_underscore then begin
|
|
|
print ctx "var $_";
|
|
|
- newline ctx;
|
|
|
+ newline ctx;
|
|
|
+ end;
|
|
|
(if ctx.es_version < 5 then
|
|
|
print ctx "function $bind(o,m) { if( m == null ) return null; if( m.__id__ == null ) m.__id__ = $global.$haxeUID++; var f; if( o.hx__closures__ == null ) o.hx__closures__ = {}; else f = o.hx__closures__[m.__id__]; if( f == null ) { f = function(){ return f.method.apply(f.scope, arguments); }; f.scope = o; f.method = m; o.hx__closures__[m.__id__] = f; } return f; }"
|
|
|
else
|