mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:29:32 +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){
|
if (isFunc){
|
||||||
// create pascal class descendent from JS function
|
// create pascal class descendent from JS function
|
||||||
c = Object.create(ancestor.prototype);
|
c = Object.create(ancestor.prototype);
|
||||||
|
c.$ancestorfunc = ancestor;
|
||||||
} else if (ancestor.$func){
|
} else if (ancestor.$func){
|
||||||
// create pascal class descendent from a pascal class descendent of a JS function
|
// create pascal class descendent from a pascal class descendent of a JS function
|
||||||
isFunc = true;
|
isFunc = true;
|
||||||
@ -397,7 +398,6 @@ var rtl = {
|
|||||||
function f(){}
|
function f(){}
|
||||||
f.prototype = c;
|
f.prototype = c;
|
||||||
c.$func = f;
|
c.$func = f;
|
||||||
c.$ancestorfunc = ancestor;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user