The DOMImplementation interface represents an object providing methods which are not dependent on any particular document.

MDN Reference

interface DOMImplementation {
    createDocument(
        namespace: string | null,
        qualifiedName: string | null,
        doctype?: DocumentType | null,
    ): XMLDocument;
    createDocumentType(
        name: string,
        publicId: string,
        systemId: string,
    ): DocumentType;
    createHTMLDocument(title?: string): Document;
    hasFeature(...args: any[]): true;
}
Index

Methods

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

    MDN Reference

    Parameters

    • namespace: string | null
    • qualifiedName: string | null
    • Optionaldoctype: DocumentType | null

    Returns XMLDocument

  • The DOMImplementation.createDocumentType() method returns a DocumentType object which can either be used with into the document via methods like Node.insertBefore() or js-nolint createDocumentType(qualifiedNameStr, publicId, systemId) - qualifiedNameStr - : A string containing the qualified name, like svg:svg.

    MDN Reference

    Parameters

    • name: string
    • publicId: string
    • systemId: string

    Returns DocumentType

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

    MDN Reference

    Parameters

    • Optionaltitle: string

    Returns Document

  • The DOMImplementation.hasFeature() method returns a boolean flag indicating if a given feature is supported.

    Parameters

    • ...args: any[]

    Returns true

    MDN Reference