14 lines
341 B
JavaScript
14 lines
341 B
JavaScript
|
export function create_button(label, onclick) {
|
||
|
const button = document.createElement("button");
|
||
|
button.innerText = label;
|
||
|
button.addEventListener("click", onclick);
|
||
|
document.body.appendChild(button);
|
||
|
return button;
|
||
|
}
|
||
|
|
||
|
export function br() {
|
||
|
const elem = document.createElement("br");
|
||
|
document.body.appendChild(elem);
|
||
|
return elem;
|
||
|
}
|