Fix skooma.js syntax for strict mode

This commit is contained in:
Talia 2021-03-05 13:29:21 +01:00
parent c16eb29161
commit 6f85103c63

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