mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-29 16:20:40 +02:00
* Add ArrayBufferView
This commit is contained in:
parent
c8925b3549
commit
73c5f17ee1
@ -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;
|
||||
|
@ -7,6 +7,7 @@ RegExp=IJSRegExp
|
||||
String=IJSString
|
||||
Array=IJSArray
|
||||
ArrayBuffer=IJSArrayBuffer
|
||||
ArrayBufferView=IJSArrayBufferView
|
||||
TypedArray=IJSTypedArray
|
||||
BufferSource=IJSBufferSource
|
||||
DataView=IJSDataView
|
||||
|
Loading…
Reference in New Issue
Block a user