Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
constructor() {
super(); // 항상 맨 앞에!
console.log(this.parentNode); // null
console.log(this.firstChild); // null
console.log(this.innerHTML); // ""
console.log(this.getAttribute('locale')); // null
this.setAttribute('locale', 'ko-KR'); // 에러: Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes
this.innerText = 'Arr'; // 에러: Uncaught DOMException: Failed to construct 'CustomElement': The result must not have children
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment