8 lines
181 B
JavaScript
8 lines
181 B
JavaScript
|
export default new Proxy(document, {
|
||
|
get: (_, tag) => content => {
|
||
|
let node = document.createElement(tag)
|
||
|
for (let key in content) node[key] = content[key]
|
||
|
return node
|
||
|
}
|
||
|
})
|