Skip to content

Missing Dialog element #16880

@arjunyel

Description

@arjunyel

TypeScript Version: 2.4.1
Code

<body>
  <dialog id="modal">
    <p>Hello Modal!</p>
  </dialog>
  <script>
    const modal = document.getElementById("modal") as HTMLDialogElement; // Error
    modal.showModal();
  </script>
</body>

Expected behavior:
Understand what a dialog element is
Actual behavior:
[ts] Cannot find name 'HTMLDialogElement'.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions