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
Killing the first p element here would result in a stored selector of div > p:nth-of-type(1), which is correct in that it uniquely targets that element.
Reloading the page will let ekill remove that p element so the markup now looks like this:
<div><div></div><pdata-second></p></div>
What happens when the second p element is now killed?
Two things go wrong here. Firstly the generated DOMString will be just be div > p, since that is correct for this new markup, and secondly it will remove the previously stored div > p:nth-of-type(1), because the substring match will consider div > p to signify a parent of div > p:nth-of-type(1).
In the end, what is left in the Hit List is just div > p, which is obviously wrong with regards to what the user intended, which was to have both elements killed off.
The text was updated successfully, but these errors were encountered:
Disregards the data-tags in the markup below, they're only there to tell tags apart. Consider the following:
Killing the first
p
element here would result in a stored selector ofdiv > p:nth-of-type(1)
, which is correct in that it uniquely targets that element.Reloading the page will let ekill remove that
p
element so the markup now looks like this:What happens when the second
p
element is now killed?Two things go wrong here. Firstly the generated DOMString will be just be
div > p
, since that is correct for this new markup, and secondly it will remove the previously storeddiv > p:nth-of-type(1)
, because the substring match will considerdiv > p
to signify a parent ofdiv > p:nth-of-type(1)
.In the end, what is left in the Hit List is just
div > p
, which is obviously wrong with regards to what the user intended, which was to have both elements killed off.The text was updated successfully, but these errors were encountered: