Make use.js remove the use attribute to prevent repetition
This commit is contained in:
parent
a1178b916a
commit
dcbadde066
1 changed files with 1 additions and 0 deletions
1
use.js
1
use.js
|
@ -10,6 +10,7 @@ const apply = (func, node) => {
|
|||
|
||||
export const use = node => {
|
||||
const code = Function("return (" + node.getAttribute("use") + ")")
|
||||
node.removeAttribute("use")
|
||||
const func = code()
|
||||
apply(func, node)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue