Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface 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

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
  • 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 DOMImplementation.createDocument upon document creation or can be put into the document via methods like Node.insertBefore() or Node.replaceChild().

    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. It is deprecated and modern browsers return true in all cases.

    Parameters

    • ...args: any[]

    Returns true

    MDN Reference

Was this helpful?