11 lines
346 B
JavaScript
11 lines
346 B
JavaScript
import { div, span, pre } from './main.js'
|
|
|
|
document.body.appendChild(div.w(128).h(64).childs([
|
|
span.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'))))
|
|
})
|