Initial DDC release
This commit is contained in:
commit
434f6441da
57 files changed
+4606
No files matched your search
Executable
+13
@@ -0,0 +1,13 @@
|
||||
export function element(tag, className, text) {
|
||||
const node = document.createElement(tag);
|
||||
if (className) node.className = className;
|
||||
if (text !== undefined && text !== null) node.textContent = text;
|
||||
return node;
|
||||
}
|
||||
|
||||
export function button(label, className, onClick) {
|
||||
const node = element("button", className, label);
|
||||
node.type = "button";
|
||||
node.addEventListener("click", onClick);
|
||||
return node;
|
||||
}
|
||||
Reference in new issue
Block a user