This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

createDocument

Summary

Creates a Document that is not attached to a window.

Method of dom/Implementationdom/Implementation

Syntax

var newDocument = implementation.createDocument(namespace, rootElementName, doctype);

Parameters

namespace

Data-type
String

The namespace URI of the resulting document or a null value.

rootElementName

Data-type
String

The qualified name (for example, namespace:localname) of the root element for the document or a null value.

doctype

Data-type
DOM Node

The desired document type for the document or a null value.

Return Value

Returns an object of type DOM NodeDOM Node

The resulting document.

Related specifications

DOM Level 3 Core
Recommendation

Attributions