[Pas2js] Pas2js 0.9.20
Michael Van Canneyt
michael at freepascal.org
Sat May 12 09:28:10 CEST 2018
On Sat, 12 May 2018, Ryan Joseph wrote:
> I got the new version but I think we need another overload for _set still. I don’t know where you translated these headers from but there appears to be a large number of possible overloads for these JS library functions so there’s probably lots more.
>
> procedure _set(anArray : TJSTypedArray); external name 'set';
> procedure _set(anArray : TJSTypedArray; anOffset : NativeInt); external name 'set';
>
> from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set:
>
> typedarray.set(array[, offset])
>
> typedarray.set(typedarray[, offset])
The headers were translated from MDN, the site you referenced.
I can add a TJSArray overload, that should catch most other cases but will
require a typecast.
I could also add a Array of <BaseType> overload to each typed array.
Suitable for you ?
Michael.
More information about the Pas2js
mailing list