mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 16:59:11 +02:00
* Add constructor to TJSArray that accepts array of const
This commit is contained in:
parent
cc1403e4db
commit
dbc3d6b98f
@ -616,6 +616,7 @@ type
|
|||||||
procedure _SetElements(Index: NativeInt; const AValue: TJOB_JSValue);
|
procedure _SetElements(Index: NativeInt; const AValue: TJOB_JSValue);
|
||||||
procedure _SetLength(const AValue: NativeInt);
|
procedure _SetLength(const AValue: NativeInt);
|
||||||
public
|
public
|
||||||
|
constructor Create(aArgs : Array of const); overload;
|
||||||
function isArray(a: TJOB_JSValue): Boolean; overload;
|
function isArray(a: TJOB_JSValue): Boolean; overload;
|
||||||
function concat(el: TJOB_JSValue): IJSArray; overload; {varargs;}
|
function concat(el: TJOB_JSValue): IJSArray; overload; {varargs;}
|
||||||
//function copyWithin(aTarget: NativeInt): IJSArray;overload; // not in IE
|
//function copyWithin(aTarget: NativeInt): IJSArray;overload; // not in IE
|
||||||
@ -1600,6 +1601,11 @@ begin
|
|||||||
WriteJSPropertyLongInt('length',AValue);
|
WriteJSPropertyLongInt('length',AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TJSArray.Create(aArgs: array of const);
|
||||||
|
begin
|
||||||
|
JOBCreate(aArgs);
|
||||||
|
end;
|
||||||
|
|
||||||
function TJSArray.isArray(a: TJOB_JSValue): Boolean;
|
function TJSArray.isArray(a: TJOB_JSValue): Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=InvokeJSBooleanResult('isArray',[a]);
|
Result:=InvokeJSBooleanResult('isArray',[a]);
|
||||||
|
Loading…
Reference in New Issue
Block a user