custom_element_ep.js (297B)
1 /* globals finishTest */ 2 class XFoo extends HTMLElement { 3 constructor() { 4 super(); 5 this.magicNumber = 42; 6 } 7 8 connectedCallback() { 9 finishTest(this.magicNumber === 42); 10 } 11 } 12 customElements.define("x-foo", XFoo); 13 14 document.firstChild.appendChild(document.createElement("x-foo"));