Fix skooma.js syntax for strict mode

This commit is contained in:
Talia 2021-03-05 13:29:21 +01:00
parent b789242c4c
commit bc251001bc
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -9,7 +9,7 @@ const parseAttribute = (attribute) => {
const parseArgs = (element, args) => { const parseArgs = (element, args) => {
if (element.content) element = element.content if (element.content) element = element.content
for (arg of args) for (let arg of args)
if (typeof(arg) == "string") if (typeof(arg) == "string")
element.appendChild(document.createTextNode(arg)) element.appendChild(document.createTextNode(arg))
else if ("nodeName" in arg) else if ("nodeName" in arg)
@ -22,6 +22,7 @@ const parseArgs = (element, args) => {
} }
const node = (name, args, xmlns) => { const node = (name, args, xmlns) => {
let element
if (xmlns) if (xmlns)
element = document.createElementNS(xmlns, name.replace("_", "-")) element = document.createElementNS(xmlns, name.replace("_", "-"))
else else