2024-05-15 20:56:42 +08:00
|
|
|
import { Button, Main } from "./main.js";
|
2024-01-12 04:38:20 +08:00
|
|
|
|
2024-05-15 20:56:42 +08:00
|
|
|
document.body.appendChild(Main({
|
|
|
|
children: [Button({
|
|
|
|
textContent: 'Hello world',
|
|
|
|
onclick: event => console.log('Hello world')
|
|
|
|
})]
|
|
|
|
}));
|
2024-01-12 04:38:20 +08:00
|
|
|
|
2024-05-15 20:56:42 +08:00
|
|
|
//import { div, pre } from './main.js'
|
|
|
|
//
|
|
|
|
//const demo = div.w(128).h(64) //.onclick.stop('click')
|
|
|
|
//demo.textContent = 'Hello world'
|
|
|
|
//
|
|
|
|
//console.log('demo', demo)
|
|
|
|
//document.body.appendChild(demo)
|
|
|
|
//document.body.appendChild(div.w(128).h(64).text('Hello world'))
|
|
|
|
//
|
|
|
|
//fetch('./index.js').then(res => res.text()).then(text => {
|
|
|
|
// document.body.appendChild(pre.text(text))
|
|
|
|
//})
|