Fix issue with a placeholder
This commit is contained in:
parent
784f0f4f28
commit
565ca32d9a
1 changed files with 1 additions and 2 deletions
|
|
@ -1245,13 +1245,12 @@
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
|
|
||||||
var placeholder = $document.createElement("span")
|
|
||||||
|
|
||||||
function injectHTML(parent, index, data) {
|
function injectHTML(parent, index, data) {
|
||||||
var nextSibling = parent.childNodes[index]
|
var nextSibling = parent.childNodes[index]
|
||||||
|
|
||||||
if (nextSibling) {
|
if (nextSibling) {
|
||||||
if (nextSibling.nodeType !== 1) {
|
if (nextSibling.nodeType !== 1) {
|
||||||
|
var placeholder = $document.createElement("span")
|
||||||
parent.insertBefore(placeholder, nextSibling || null)
|
parent.insertBefore(placeholder, nextSibling || null)
|
||||||
placeholder.insertAdjacentHTML("beforebegin", data)
|
placeholder.insertAdjacentHTML("beforebegin", data)
|
||||||
parent.removeChild(placeholder)
|
parent.removeChild(placeholder)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue