Skip to content

ShadowRoot interface and attachShadow function are missing from type definitions #10401

Closed
@ghost

Description

TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)

Code

// A *self-contained* demonstration of the problem follows...
class CustomElement extends HTMLElement {
    private shadowDom : ShadowRoot;

    createdCallback() : void {
        this.shadowDom = this.attachShadow({mode: "closed"});
    }
}

Expected behavior:
ShadowRoot is recognized as a valid type, and the HTMLElement's attachShadow function is recognized as per the DOM standard.

Actual behavior:
Neither ShadorRoot nor the attachShadow functions are recognized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions