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
While looking at the code, you would expect a result like this:
string(4) "span"
bool(false)
But, the real result is this:
string(5) "span"
bool(true)
If you remove the <img> tag from the HTML code, it returns false, so this is why I'm guessing that the is() method is traversing through the DOM like the find() method.
Regards
Code-Working
The text was updated successfully, but these errors were encountered:
Hi,
I've just found a small bug while using the DOMQuery::is() method with a tag selector.
It seems as if the is() method does not check the matched element itself but all elements below the matched DOM query.
A simple code is this:
While looking at the code, you would expect a result like this:
But, the real result is this:
If you remove the
<img>
tag from the HTML code, it returns false, so this is why I'm guessing that the is() method is traversing through the DOM like the find() method.Regards
Code-Working
The text was updated successfully, but these errors were encountered: