-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
jquery/sizzle
#486Description
Using the following example, the console shows 1,1,1,1
on Safari (15.6.1) and Firefox (104.0.1), but 1,1,0,0
on Chrome (105.0.5195.52). I would expect the result to also be 1,1,1,1
on Chrome. Based on our usage in Selenium, I think the result actually was also 1,1,1,1
on previous versions of Chrome (≤ 104).
<html>
<head>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
</head>
<body>
<ul>
<li>Item</li>
</ul>
<script>
console.log("" + [
$("li:contains('Item')").length,
$("ul:has(li)").length,
$("ul:has(li:contains('Item'))").length,
$("ul:has(> li:contains('Item'))").length ]);
</script>
</body>
</html>
pudgecit, vvasiloi, Alagunto, ashkansirous, paulirish and 2 moreashkansirous and twschiller