fix issue with loader and refactoring

This commit is contained in:
Simon Vieille
2022-10-16 19:57:32 +02:00
parent f0988b93bd
commit 7c86d53da7
7 changed files with 200 additions and 210 deletions
+11
View File
@@ -0,0 +1,11 @@
module.exports = (tagName, attributes) => {
const element = document.createElement(tagName)
if (typeof attributes === 'object') {
for (let i in attributes) {
element.setAttribute(i, attributes[i])
}
}
return element
}