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
{{ message }}
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.
The select function in NodeRef is used to get all nodes matching a given CSS selector which is inclusive of the NodeRef that calls it. This works fine but could be cause for concern if the iterator it returns is then used to delete nodes.
Is there a way to get a non inclusive iterator that does not involve using a if statement before looping?
The
select
function inNodeRef
is used to get all nodes matching a given CSS selector which is inclusive of theNodeRef
that calls it. This works fine but could be cause for concern if the iterator it returns is then used to delete nodes.Is there a way to get a non inclusive iterator that does not involve using a if statement before looping?
Consider the following HTML
In the following Rust code, we assume the node with the
div#top
selector is bound to a variablex
:This would delete
div#top
which is probably unintentional if a user only wanted to remove its<div>
children.The text was updated successfully, but these errors were encountered: