UNPKG

352 BJavaScriptView Raw
1const Node = require('./Node');
2
3// interface DocumentType // https://dom.spec.whatwg.org/#documenttype
4module.exports = class DocumentType extends Node {
5 constructor(ownerDocument) {
6 super(ownerDocument);
7 this.nodeType = Node.DOCUMENT_TYPE_NODE;
8 this.name = 'html';
9 }
10
11 toString() {
12 return '<!DOCTYPE ' + this.name + '>';
13 }
14
15};