widgets/index.js

22 lines
585 B
JavaScript

import { Button, Main } from "./main.js";
document.body.appendChild(Main({
children: [Button({
textContent: 'Hello world',
onclick: event => console.log('Hello world')
})]
}));
//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))
//})