Skip to main content

DOMImplementation

The DOMImplementation interface represents an object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property.

MDN Reference

Methods

createDocument()

createDocument(
namespace,
qualifiedName,
doctype?
): XMLDocument;

The DOMImplementation.createDocument() method creates and returns an XMLDocument.

MDN Reference

Parameters

ParameterType
namespacestring | null
qualifiedNamestring | null
doctype?DocumentType | null

Returns

XMLDocument


createDocumentType()

createDocumentType(
name,
publicId,
systemId
): DocumentType;

The DOMImplementation.createDocumentType() method returns a DocumentType object which can either be used with DOMImplementation.createDocument upon document creation or can be put into the document via methods like Node.insertBefore() or Node.replaceChild().

MDN Reference

Parameters

ParameterType
namestring
publicIdstring
systemIdstring

Returns

DocumentType


createHTMLDocument()

createHTMLDocument(title?): Document;

The DOMImplementation.createHTMLDocument() method creates a new HTML Document.

MDN Reference

Parameters

ParameterType
title?string

Returns

Document


hasFeature()

hasFeature(...args): true;

The DOMImplementation.hasFeature() method returns a boolean flag indicating if a given feature is supported. It is deprecated and modern browsers return true in all cases.

Parameters

ParameterType
...argsany[]

Returns

true

Deprecated

MDN Reference