Remove obsolete files

This commit is contained in:
Manuel Thalmann 2022-12-15 12:02:53 +01:00
parent cd88607ad3
commit 1e47864ee2
No known key found for this signature in database
GPG key ID: 5FD9AD3CCDDBD27B

View file

@ -1,39 +0,0 @@
/**
* Creates a new element based on the provided data.
*
* @param {string} type
* The type of the element to create.
*
* @param {Record<string, any>} attrs
* The attributes to add.
*
* @param {...(Node | string)} children
* The children to add to the element.
*
* @returns {HTMLElement}
* The newly created element.
*/
export function elt(type, attrs, ...children)
{
let node = document.createElement(type);
Object.keys(attrs).forEach(
key =>
{
node.setAttribute(key, attrs[key]);
});
for (let child of children)
{
if (typeof child !== "string")
{
node.appendChild(child);
}
else
{
node.appendChild(document.createTextNode(child));
}
}
return node;
}