Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iggyvolz/913d409ccb50e17b4d21b7511c8dbc5e to your computer and use it in GitHub Desktop.
Save iggyvolz/913d409ccb50e17b4d21b7511c8dbc5e to your computer and use it in GitHub Desktop.
Errant HTML
<!doctype html>
<head>
<script>
class foo extends HTMLInputElement
{
constructor() {
alert("constructed");
super();
}
connectedCallback(){
alert("connected");
}
}
customElements.define("my-custom-element", foo, {extends: "input"});
</script>
</head>
<body>
<input type="text" is="my-custom-element">
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment