Implement DOMImplementation::createDocumentType

Implementation according to spec:
http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype

Closes #1489.
This commit is contained in:
Bruno de Oliveira Abinader 2014-01-15 11:17:09 -04:00
parent c876335d22
commit 0d35d4932b
3 changed files with 35 additions and 3 deletions

View file

@ -11,6 +11,17 @@
is(document.implementation, implementation, "test1-2, basic test");
}
// test2: createDocumentType
{
is(document.doctype, null, "test2-0, createDocumentType");
var doctype = document.implementation.createDocumentType("html", null, null);
is_a(doctype && doctype, DocumentType, "test2-1, createDocumentType");
doctype = document.implementation.createDocumentType("html:html", null, null);
is_a(doctype && doctype, DocumentType, "test2-2, createDocumentType");
}
finish();
</script>
</head>