mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 04:59:26 +02:00
pastojs: fixed create pascal class descendent from a pascal class descendent of a JS function
git-svn-id: trunk@46807 -
This commit is contained in:
parent
9d3daca70c
commit
342771c0c7
2
utils/pas2js/dist/rtl.js
vendored
2
utils/pas2js/dist/rtl.js
vendored
@ -353,6 +353,7 @@ var rtl = {
|
||||
if (isFunc){
|
||||
// create pascal class descendent from JS function
|
||||
c = Object.create(ancestor.prototype);
|
||||
c.$ancestorfunc = ancestor;
|
||||
} else if (ancestor.$func){
|
||||
// create pascal class descendent from a pascal class descendent of a JS function
|
||||
isFunc = true;
|
||||
@ -397,7 +398,6 @@ var rtl = {
|
||||
function f(){}
|
||||
f.prototype = c;
|
||||
c.$func = f;
|
||||
c.$ancestorfunc = ancestor;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user