import {HTMLElement} from './element.js'; const {toString} = HTMLElement.prototype; export class TextElement extends HTMLElement { get innerHTML() { return this.textContent; } set innerHTML(html) { this.textContent = html; } toString() { const outerHTML = toString.call(this.cloneNode()); return outerHTML.replace('><', () => `>${this.textContent}<`); } }