import { div, span, pre } from './main.js' document.body.appendChild(div.w(128).h(64).childs([ span.m('2rem').p({ top: '2rem' }).text('Hello world!'), new span({ textContent: 'Hello world!' }), ])) fetch('/index.js').then(res => res.text()).then(text => { document.body.appendChild(pre.p('2rem').bg('#ececec').text(text.substring(0, text.indexOf('fetch')))) })