Skip to content

Commit

Permalink
createDocument: don't create a doctype automatically. If the caller d…
Browse files Browse the repository at this point in the history
…oesn't pass in a doctype, create a document with no doctype.
  • Loading branch information
djcsdy committed Feb 7, 2011
1 parent ef647dd commit e90346d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/jsdom/level2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ core.DOMImplementation.prototype.createDocument = function(/* String */ na
}

var document = new core.Document();
document.doctype = doctype || new core.DocumentType(document, 'xml');
document.doctype = doctype || null;

if (!document.doctype.entities) {
document.doctype.entities = new dom.EntityNodeMap();
if (doctype && !doctype.entities) {
doctype.entities = new dom.EntityNodeMap();
}

document._ownerDocument = document;
Expand Down

0 comments on commit e90346d

Please sign in to comment.