this JS ecosystem reference



this (JS reference object)
Smart pascal source code
function this: variant; external 'this' property; // var this external "this" : THandle; --> external class procedure procedureToCall(unknown: variant); begin { add a new property just for fun } unknown.NewValue := "Look, no hand"; { call back into the unknow object } unknown.Callback(unknown); end; procedure DONTCALLME; begin procedureToCall( CLASS someProperty: Integer = 12; Callback := procedure() begin { dump object to console } WriteLn(this) // {"someProperty":12,"NewValue":"Look, no hand"} end; END); end;