Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute 'insertBefore' on 'Node': This node type does not support this method #993

Open
niutech opened this issue Nov 3, 2020 · 1 comment

Comments

@niutech
Copy link
Contributor

niutech commented Nov 3, 2020

I get the DOMException: Failed to execute 'insertBefore' on 'Node': This node type does not support this method. in child-list.ts:57: target.insertBefore(newNode, (nextSibling && getNode(nextSibling)) || null);. The target and newNode are text nodes (nodeName === "#text") and nextSibling is undefined. You cannot add children to a text node.
Could you please fix it by checking if (target.nodeType !== 3)?

Stacktrace:

Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': This node type does not support this method.
at workerdom.min.js:2:7552
at Uint16Array.forEach ()
at Object.execute (workerdom.min.js:2:7505)
at workerdom.min.js:2:10802
at Array.forEach ()
at syncFlush (workerdom.min.js:2:10604)

I am calling el.innerHTML = "..." in a loop.

@Pocok256
Copy link

Same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants