2024-01-12 04:17:51 +08:00
|
|
|
import { div, pre } from './main.js'
|
|
|
|
|
2024-04-11 03:12:50 +08:00
|
|
|
const main = div.w(64).h(64).text('main').absolute({ top: 32, left: 32 })
|
|
|
|
document.body.appendChild(main)
|
2024-01-12 04:17:51 +08:00
|
|
|
|
2024-04-11 03:12:50 +08:00
|
|
|
|
|
|
|
document.body.appendChild(div.w(128).h(64).text('Hello world').click(event => {
|
|
|
|
console.log('click !')
|
|
|
|
}))
|
2024-01-12 04:17:51 +08:00
|
|
|
|
|
|
|
fetch('./index.js').then(res => res.text()).then(text => {
|
|
|
|
document.body.appendChild(pre.text(text))
|
|
|
|
})
|