mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
The nodeClass is based on the "nodeClass" property or the constructor property
This commit is contained in:
parent
d04f93863d
commit
400a3b6015
@ -522,7 +522,7 @@ Node.prototype = {
|
|||||||
forEachEntry(this.namespaceMappings, callback, thisObj);
|
forEachEntry(this.namespaceMappings, callback, thisObj);
|
||||||
},
|
},
|
||||||
getNodeClass: function () {
|
getNodeClass: function () {
|
||||||
return this.nodeClass || this.getClass();
|
return this.nodeClass || this.constructor;
|
||||||
},
|
},
|
||||||
setNodeClass: function (nodeClass) {
|
setNodeClass: function (nodeClass) {
|
||||||
this.nodeClass = nodeClass;
|
this.nodeClass = nodeClass;
|
||||||
@ -533,7 +533,7 @@ Node.prototype = {
|
|||||||
out.push(indent + node.toString() + '\n');
|
out.push(indent + node.toString() + '\n');
|
||||||
node.forEachChild(function (child) {
|
node.forEachChild(function (child) {
|
||||||
printNode(child, indent + ' ');
|
printNode(child, indent + ' ');
|
||||||
}, this);
|
});
|
||||||
}
|
}
|
||||||
printNode(this, '');
|
printNode(this, '');
|
||||||
return out.join('');
|
return out.join('');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user