[Pas2js] Descending a Pascal class from a JS Function

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jun 30 00:12:26 CEST 2020


Hi all,

In JS the "new" operator is often used to create objects, where a
function works similar to a Pascal class.

pas2js trunk now supports descending a Pascal class from such a JS
Function.

https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/utils/pas2js/docs/translation.html?view=co#externalclassancestor

Instances are JS Functions and the instanceof operator works as
expected, allowing to pass the Pascal object to JS frameworks.

Mattias


More information about the Pas2js mailing list