<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - jQuery 'is' implementation causes exception to be thrown"
href="https://bugs.webkit.org/show_bug.cgi?id=151165#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - jQuery 'is' implementation causes exception to be thrown"
href="https://bugs.webkit.org/show_bug.cgi?id=151165">bug 151165</a>
from <span class="vcard"><a class="email" href="mailto:bfulgham@webkit.org" title="Brent Fulgham <bfulgham@webkit.org>"> <span class="fn">Brent Fulgham</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=151165#c6">comment #6</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=151165#c5">comment #5</a>)
> > All major browsers (Tested Safari, Firefox and Chrome) throw when calling:
> > document.body.matches(":visible")
> >
> > They all complain about the selector being invalid.
>
> Apparently, ":visible" is a jQuery extension and not an actual CSS selector
> so it makes sense that Element.matches(":visible") throws. I don't know what
> jQuery's Element.is(":visible") does under the scene and which selector is
> actually being passed to WebKit.</span >
I put a breakpoint in the element.matches code. When jQuery calls is(":visible"), that's exactly what we get. So, we attempt to match the invalid selector ":visible", and a syntax error is thrown.
This seems like it's just bad coding in jQuery. We do what the specification requires.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>