mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 08:30:54 +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 _SetLength(const AValue: NativeInt);
|
||||
public
|
||||
constructor Create(aArgs : Array of const); overload;
|
||||
function isArray(a: TJOB_JSValue): Boolean; overload;
|
||||
function concat(el: TJOB_JSValue): IJSArray; overload; {varargs;}
|
||||
//function copyWithin(aTarget: NativeInt): IJSArray;overload; // not in IE
|
||||
@ -1600,6 +1601,11 @@ begin
|
||||
WriteJSPropertyLongInt('length',AValue);
|
||||
end;
|
||||
|
||||
constructor TJSArray.Create(aArgs: array of const);
|
||||
begin
|
||||
JOBCreate(aArgs);
|
||||
end;
|
||||
|
||||
function TJSArray.isArray(a: TJOB_JSValue): Boolean;
|
||||
begin
|
||||
Result:=InvokeJSBooleanResult('isArray',[a]);
|
||||
|
Loading…
Reference in New Issue
Block a user