mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 15:25:26 +00:00
lint
This commit is contained in:
parent
2b17cef955
commit
dee3abbd9a
@ -297,7 +297,7 @@ var htmx = (function() {
|
|||||||
Array.from(fragment.querySelectorAll('script')).forEach((script) => {
|
Array.from(fragment.querySelectorAll('script')).forEach((script) => {
|
||||||
if (script.type === 'text/javascript' || script.type === 'module' || script.type === '') {
|
if (script.type === 'text/javascript' || script.type === 'module' || script.type === '') {
|
||||||
const newScript = getDocument().createElement('script')
|
const newScript = getDocument().createElement('script')
|
||||||
forEach(script.attributes, function (attr) {
|
forEach(script.attributes, function(attr) {
|
||||||
newScript.setAttribute(attr.name, attr.value)
|
newScript.setAttribute(attr.name, attr.value)
|
||||||
})
|
})
|
||||||
newScript.textContent = script.textContent
|
newScript.textContent = script.textContent
|
||||||
@ -317,7 +317,7 @@ var htmx = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -362,7 +362,7 @@ var htmx = (function() {
|
|||||||
}
|
}
|
||||||
if (fragment) {
|
if (fragment) {
|
||||||
if (htmx.config.allowScriptTags) {
|
if (htmx.config.allowScriptTags) {
|
||||||
normaliseScriptTags(fragment);
|
normaliseScriptTags(fragment)
|
||||||
} else {
|
} else {
|
||||||
// remove all script tags if scripts are disabled
|
// remove all script tags if scripts are disabled
|
||||||
fragment.querySelectorAll('script').forEach((script) => script.remove())
|
fragment.querySelectorAll('script').forEach((script) => script.remove())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user