Answer the question
In order to leave comments, you need to log in
How to remove removeChild which is innerHTML without searching querySelector (Angular)?
There is something like this HTML structure:
A parent that contains a child node that is inserted as innerHTML. I need to remove this node, without document.querySelector and document.getElementById . I can’t remove it via element.removeChild(element), because due to the fact that it is innerHTML, I get that the node is not a child. Help solve the problem.
<div class="parent">
<div class="child">Text</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question