Add special case for dataset to skooma templating
This commit is contained in:
parent
742eb36035
commit
4e67cba014
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@ const parseArgs = (element, before, ...args) => {
|
|||
for (let key in arg)
|
||||
if (key == "style" && typeof(arg[key])=="object")
|
||||
insertStyles(element.style, arg[key])
|
||||
else if (key == "dataset" && typeof(arg[key])=="object")
|
||||
for (let [key2, value] of Object.entries(arg[key]))
|
||||
element.dataset[key2] = parseAttribute(value)
|
||||
else if (key == "shadowRoot")
|
||||
parseArgs((element.shadowRoot || element.attachShadow({mode: "open"})), null, arg[key])
|
||||
else if (typeof arg[key] === "function")
|
||||
|
|
Loading…
Reference in a new issue