demo: descend Pascal class from JS function

This commit is contained in:
mattias 2020-06-28 16:32:47 +00:00
parent 271f20ea13
commit 65bc20baef

View File

@ -1,14 +1,17 @@
{ Demo showing how to create a Pascal class descendant from a JS function.
}
program ExtendJSFunctionClass1;
{$mode objfpc}
{$ModeSwitch externalclass}
uses
JS, Classes, SysUtils, Web;
JS, browserconsole;
type
{ TJSPerson - a JS function, which is used like a class }
{ TJSPerson - a JS function, which is used like a class
Person is declared in the html }
TJSPerson = class external name 'Person'(TJSFunction)
public