mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 07:28:26 +02:00
pas2js: doc about extending JS function
git-svn-id: trunk@45716 -
This commit is contained in:
parent
cbf5f1a769
commit
062fbb5e41
@ -2888,7 +2888,11 @@ Begin
|
||||
inherited New(b+1); // optional: call inherited constructor function
|
||||
End;
|
||||
|
||||
var
|
||||
f: TMyFunc;
|
||||
Begin
|
||||
f:=TMyFunc.Create(3);
|
||||
writeln(jsInstanceOf(f,TExternalFunc)); // writes true, instanceof operator works as expected
|
||||
End.
|
||||
</pre>
|
||||
</td>
|
||||
@ -2904,7 +2908,10 @@ End.
|
||||
this.$ancestorfunc(b+1);
|
||||
};
|
||||
});
|
||||
this.f = null;
|
||||
$mod.$main = function () {
|
||||
f = $mod.TMyFunc.$create("Create$2",[3]);
|
||||
pas.System.Writeln(pas.JS.jsInstanceOf(f,ExternalFunc));
|
||||
};
|
||||
});
|
||||
</pre>
|
||||
|
Loading…
Reference in New Issue
Block a user