Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@andruhon
Last active February 22, 2016 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andruhon/2310fcff2860426b06ec to your computer and use it in GitHub Desktop.
Save andruhon/2310fcff2860426b06ec to your computer and use it in GitHub Desktop.
HTMLDialogElement TypeScript definition
interface HTMLDialogElement extends HTMLElement {
open: boolean,
returnValue: string,
close: ()=>any,
show: ()=>any,
showModal: ()=>any
}
declare var HTMLDialogElement: {
prototype: HTMLDialogElement;
new(): HTMLDialogElement;
};
//using cast: let dialog = <HTMLDialogElement> document.getElementById("mydialog");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment