mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-31 10:20:17 +02:00
demo: descend Pascal class from JS function
This commit is contained in:
parent
271f20ea13
commit
65bc20baef
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user