Add mini.js as minimalist node creation helper

This commit is contained in:
Talia 2024-09-07 08:54:25 +02:00
parent d33b6fd177
commit be2cbee5e6
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

7
mini.js Normal file
View file

@ -0,0 +1,7 @@
export default new Proxy(document, {
get: (_, tag) => content => {
let node = document.createElement(tag)
for (let key in content) node[key] = content[key]
return node
}
})