Creates a DOM Document object of the specified type with its document element.
Note that based on the
DocumentType
given to create the document, the implementation may instantiate specialized
Document
objects that support additional features than the "Core", such as "HTML" [
DOM Level 2 HTML ] . On the other hand, setting the
DocumentType
after the document was created makes this very unlikely to happen. Alternatively, specialized
Document
creation methods, such as
createHTMLDocument
[
DOM Level 2 HTML ] , can be used to obtain specific types of
Document
objects.