* revert method property

This commit is contained in:
Michaël Van Canneyt 2024-06-28 09:40:13 +02:00
parent 4c3af63fad
commit 8884c1967d

View File

@ -288,7 +288,7 @@ type
function ReadJSPropertyInt64(const aName: UTF8String): Int64; virtual; function ReadJSPropertyInt64(const aName: UTF8String): Int64; virtual;
function ReadJSPropertyValue(const aName: UTF8String): TJOB_JSValue; virtual; function ReadJSPropertyValue(const aName: UTF8String): TJOB_JSValue; virtual;
function ReadJSPropertyVariant(const aName: UTF8String): Variant; virtual; function ReadJSPropertyVariant(const aName: UTF8String): Variant; virtual;
function ReadJSPropertyMethod(const aName: UTF8String): IJSFunction; virtual; function ReadJSPropertyMethod(const aName: UTF8String): TMethod; virtual;
// write a property // write a property
procedure WriteJSPropertyBoolean(const aName: UTF8String; Value: Boolean); virtual; procedure WriteJSPropertyBoolean(const aName: UTF8String; Value: Boolean); virtual;
procedure WriteJSPropertyDouble(const aName: UTF8String; Value: Double); virtual; procedure WriteJSPropertyDouble(const aName: UTF8String; Value: Double); virtual;
@ -389,7 +389,7 @@ type
function ReadJSPropertyInt64(const aName: UTF8String): Int64; virtual; function ReadJSPropertyInt64(const aName: UTF8String): Int64; virtual;
function ReadJSPropertyValue(const aName: UTF8String): TJOB_JSValue; virtual; function ReadJSPropertyValue(const aName: UTF8String): TJOB_JSValue; virtual;
function ReadJSPropertyVariant(const aName: UTF8String): Variant; virtual; function ReadJSPropertyVariant(const aName: UTF8String): Variant; virtual;
function ReadJSPropertyMethod(const aName: UTF8String): IJSFunction; virtual; function ReadJSPropertyMethod(const aName: UTF8String): TMethod ; virtual;
// write a property // write a property
procedure WriteJSPropertyBoolean(const aName: UTF8String; Value: Boolean); virtual; procedure WriteJSPropertyBoolean(const aName: UTF8String; Value: Boolean); virtual;
procedure WriteJSPropertyDouble(const aName: UTF8String; Value: Double); virtual; procedure WriteJSPropertyDouble(const aName: UTF8String; Value: Double); virtual;
@ -3949,9 +3949,11 @@ begin
Result:=InvokeJSVariantResult(aName,[],jiGet); Result:=InvokeJSVariantResult(aName,[],jiGet);
end; end;
function TJSObject.ReadJSPropertyMethod(const aName: UTF8String): IJSFunction; function TJSObject.ReadJSPropertyMethod(const aName: UTF8String): TMethod;
begin begin
Result:=InvokeJSObjectResult(aName,[],TJSFunction,jiGet) as IJSFunction; Result.Data:=nil;
Result.Code:=nil;
// Result:=InvokeJSObjectResult(aName,[],TJSFunction,jiGet) as IJSFunction;
end; end;
procedure TJSObject.WriteJSPropertyBoolean(const aName: UTF8String; Value: Boolean); procedure TJSObject.WriteJSPropertyBoolean(const aName: UTF8String; Value: Boolean);