DOMException: The supplied node is incorrect or has an incorrect ancestor for this operation.
See original GitHub issueHi Andrea,
I have a strange bug. Maybe it is because of nesting things in the wrong way.
It happens at: http://rdf-form.danielbeeke.nl/ If you scroll down till you see a form. There is a field Author. If you empty it, type something that it would not find, click on Add sghfghdg as text without reference.. Then it will crash with:
DOMException: The supplied node is incorrect or has an incorrect ancestor for this operation.
Source code: https://github.com/danielbeeke/rdf-form/blob/master/src/RdfForm.ts https://github.com/danielbeeke/rdf-form/blob/master/src/FormElements/FormElementBase.ts
I have not yet used html.for(object)`` at that place I do not have an object. I only have a key. Would .for help in this situation?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
DOMException - Web APIs | MDN
The DOMException interface represents an abnormal event (called ... The node is incorrect or has an incorrect ancestor for this operation.
Read more >why does this piece of js throw a DOM Exception?
The problem is the status not available when the readyState is 0/1. You need to reverse the order in your if. if(xhr.
Read more >DOM - DOMException Object - Tutorialspoint
The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: 24 and legacy constant name: INVALID_NODE_TYPE_ERR).
Read more >DOMException - Web APIs
The DOMException interface represents an abnormal event (called an exception) ... The node is incorrect or has an incorrect ancestor for this operation....
Read more >DOMException | Aspose.HTML for .NET API Reference
The DOMException interface represents an abnormal event called an ... The supplied node is incorrect or has an incorrect ancestor for this operation....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In few words, don’t over-cache anything, as the result will be likely slower instead, and you’re not supposed to manually move parts around, that’s responsibility of udom to drop, add, or move, nodes … you never need to take care but if you need same node as reference, you need to use
.for(...)
In any case, if by “save parts into a variable and use that variable multiple times” you mean store a node into a variable, you can’t reuse that variable in more than a place for the simple reason that a node is a node, and the tree-differ can’t do anything if you arbitrary moves nodes that the tree-differ is handling already.
no, it’s not, you’re moving a node manually around and you shouldn’t.
On top of that,
this.remove()
won’t remove the element but its outer most container, if it’s a DOM node, or it throws … that’s an arrow function, the context in your example is unknown.to be honest, I’d write this one: