diff --git a/packages/rtl/src/js.pas b/packages/rtl/src/js.pas index 77751ee..2337112 100644 --- a/packages/rtl/src/js.pas +++ b/packages/rtl/src/js.pas @@ -973,6 +973,28 @@ type Property Encoding : string Read FEncoding; end; + generic TGGenerator = class external name 'Generator' (TJSObject) + private type + TGGeneratorValue = class external name 'Generator' (TJSObject) + public + done: Boolean; + value: T; + end; + public + function next: TGGeneratorValue; overload; + function next(Value: T): TGGeneratorValue; overload; + function return: TGGeneratorValue; overload; + function return(Value: T): TGGeneratorValue; overload; + function throw(Error: TJSError): TGGeneratorValue; + end; + + TJSGenerator = specialize TGGenerator; + + TJSProxy = class external name 'Proxy' (TJSObject) + public + constructor New(Target, Handler: TJSObject); + end; + var // JSArguments can be used in procedures/functions to provide access to the 'arguments' array.