зеркало из https://github.com/mozilla/gecko-dev.git
15 строки
297 B
JavaScript
15 строки
297 B
JavaScript
/* globals finishTest */
|
|
class XFoo extends HTMLElement {
|
|
constructor() {
|
|
super();
|
|
this.magicNumber = 42;
|
|
}
|
|
|
|
connectedCallback() {
|
|
finishTest(this.magicNumber === 42);
|
|
}
|
|
}
|
|
customElements.define("x-foo", XFoo);
|
|
|
|
document.firstChild.appendChild(document.createElement("x-foo"));
|