Skip to content

override missing from createElementNS #63556

@mozesstumpf

Description

@mozesstumpf

⚙ Compilation target

ESNext

⚙ Library

6.0.0

Missing / Incorrect Definition

override is missing for the createElementNS in case provide "http://www.w3.org/1999/xhtml" as namespaceURI.

// missing  createElementNS<K extends keyof HTMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: K): HTMLElementTagNameMap[K];
createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement;
createElementNS<K extends keyof SVGElementTagNameMap>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K];
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement;
createElementNS<K extends keyof MathMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: K): MathMLElementTagNameMap[K];

Sample Code

document.createElementNS("http://www.w3.org/1999/xhtml", 'div'); // HTMLElement instead of HTMLDivElement

Documentation Link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions