У меня есть класс
function Node() {
//implementation
}
и еще один класс
function AttributionalNode() {
this.prototype.setAttr = function (attr) {
this.atText = attr;
};
}
AttributionalNode.prototype = new Node();
AttributionalNode.prototype.constructor = AttributionalNode;
Как создать класс Node(), чтобы он не мог быть создан? например, когда я пытаюсь
var node = new Node();
Итак, он выбрасывает исключение?