Skip to content

Commit

Permalink
Merge pull request #78 from isnotgood/master
Browse files Browse the repository at this point in the history
TypeError when Document is created with DocumentType
thanks for your work
  • Loading branch information
jindw committed Aug 24, 2014
2 parents bf166fe + 9e436be commit ba14b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ DOMImplementation.prototype = {
// Introduced in DOM Level 2:
createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
var doc = new Document();
doc.implementation = this;
doc.childNodes = new NodeList();
doc.doctype = doctype;
if(doctype){
doc.appendChild(doctype);
}
doc.implementation = this;
doc.childNodes = new NodeList();
if(qualifiedName){
var root = doc.createElementNS(namespaceURI,qualifiedName);
doc.appendChild(root);
Expand Down

0 comments on commit ba14b0f

Please sign in to comment.