* Add ArrayBufferView

This commit is contained in:
Michaël Van Canneyt 2024-04-11 15:40:12 +02:00
parent c8925b3549
commit 73c5f17ee1
2 changed files with 26 additions and 0 deletions

View File

@ -640,6 +640,7 @@ type
['{A1612EED-4F05-46C0-90BE-ACD511B15E89}']
end;
{ TJSArrayBuffer }
TJSArrayBuffer = class(TJSObject,IJSArrayBuffer)
@ -647,6 +648,20 @@ type
class function Cast(const Intf: IJSObject): IJSArrayBuffer; overload;
end;
{ IJSArrayBufferView }
IJSArrayBufferView = interface(IJSObject)
['{A1612EED-4F05-46C0-90BE-ACD511B1598E}']
end;
{ TJSArrayBufferView }
TJSArrayBufferView = class(TJSObject,IJSArrayBufferView)
public
class function Cast(const Intf: IJSObject): IJSArrayBufferView; overload;
end;
{ IJSTypedArray }
IJSTypedArray = interface(IJSObject)
@ -1394,6 +1409,16 @@ begin
Result:=TJSArrayBuffer.Cast(Intf);
end;
{ TJSArrayBufferView }
class function TJSArrayBuffer.Cast(const Intf: IJSObject): IJSArrayBuffer;
begin
Result:=TJSArrayBufferView.Cast(Intf);
end;
{ TJSArray }
function TJSArray._GetElements(Index: NativeInt): TJOB_JSValue;

View File

@ -7,6 +7,7 @@ RegExp=IJSRegExp
String=IJSString
Array=IJSArray
ArrayBuffer=IJSArrayBuffer
ArrayBufferView=IJSArrayBufferView
TypedArray=IJSTypedArray
BufferSource=IJSBufferSource
DataView=IJSDataView