2024-05-16 05:00:08 +08:00
|
|
|
import { div, span, pre } from './main.js'
|
2024-01-12 04:38:20 +08:00
|
|
|
|
2024-05-16 05:00:08 +08:00
|
|
|
document.body.appendChild(div.w(128).h(64).childs([
|
2024-05-16 06:46:41 +08:00
|
|
|
span.m('2rem').p({ top: '2rem' }).text('Hello world!'),
|
2024-05-16 05:00:08 +08:00
|
|
|
new span({ textContent: 'Hello world!' }),
|
2024-05-15 22:38:07 +08:00
|
|
|
]))
|
2024-01-12 04:38:20 +08:00
|
|
|
|
2024-05-16 05:00:08 +08:00
|
|
|
fetch('/index.js').then(res => res.text()).then(text => {
|
|
|
|
document.body.appendChild(pre.p('2rem').bg('#ececec').text(text.substring(0, text.indexOf('fetch'))))
|
|
|
|
})
|