diff --git a/public/weigets.js b/public/weigets.js index af431d6..c6f696b 100644 --- a/public/weigets.js +++ b/public/weigets.js @@ -1,4 +1,4 @@ -export function createElement({ innerText, textContent, onclick, children = [], dataset, classList = [], ...attributes }, tagName) { +export function createElement({ innerText, textContent, onclick, children = [], dataset, classList = [], ...attributes }, tagName = 'div') { const element = document.createElement(tagName) for (const key in attributes) { element.setAttribute(key, attributes[key])