browser-x
Version:
A partial implementation of the W3C DOM API on top of an HTML5 parser and serializer.
34 lines (29 loc) • 767 B
JavaScript
;
var NamedNodeMap = require('./named-node-map');
var Node = require('./node');
function DocumentType(ownerDocument, name, publicId, systemId) {
Node.call(this, ownerDocument, name, null, Node.DOCUMENT_TYPE_NODE);
Object.defineProperties(this, {
entities: {
value: new NamedNodeMap()
},
notations: {
value: new NamedNodeMap()
},
publicId: {
value: publicId
},
systemId: {
value: systemId
}
});
}
DocumentType.prototype = Object.create(Node.prototype, {
name: {
get: function() {
return this.nodeName;
}
}
});
DocumentType.prototype.constructor = DocumentType;
module.exports = DocumentType;