You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expression d3.select("#content").selectChildren().remove() will only remove the even-numbered elements. I find this behavior surprising, and would naively expect it to remove all of the <span> tags.
In contrast, the expression d3.select("#content").selectAll("*").remove()will remove all of the <span> tags.
The text was updated successfully, but these errors were encountered:
Good catch! Maybe a solution would be to materialize Array.from(...this.children) instead of this.children, because remove calls each with a function which mutates this.children.
I've implemented this in #276, it passes all tests but I'm not 100% sure it's the right approach.
For example, given the following HTML:
The expression
d3.select("#content").selectChildren().remove()
will only remove the even-numbered elements. I find this behavior surprising, and would naively expect it to remove all of the<span>
tags.In contrast, the expression
d3.select("#content").selectAll("*").remove()
will remove all of the<span>
tags.The text was updated successfully, but these errors were encountered: