Click here to download the Blitz Browser!

WPT

wpt / dom / nodes / Element-closest.html

Spec: DOM ↗

Runs: Chrome 155.0.8042.0 (wpt@4eb09bcd9, 2026-09-04) | Firefox 157.0a1 (wpt@c3fcbf4ba, 2026-09-04) | Safari 251 preview (wpt@e7122b73f, 2026-09-04) | Ladybird 1.0-52f0f (wpt@a1ecd0c09, 2026-09-04) | Servo Servo 0.6 (wpt@2c385f65e, 2026-09-04) | Blitz a50cb8971 (wpt@a95401e4e, 2026-09-03)

View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi

ChromeFirefoxSafariLadybirdServoBlitz
Total29/2929/2929/2929/2928/29NOT RUN
SubtestChromeFirefoxSafariLadybirdServoBlitz
Element.closest with context node 'test12' and selector 'select'PASSPASSPASSPASSPASS
Element.closest with context node 'test13' and selector 'fieldset'PASSPASSPASSPASSPASS
Element.closest with context node 'test13' and selector 'div'PASSPASSPASSPASSPASS
Element.closest with context node 'test3' and selector 'body'PASSPASSPASSPASSPASS
Element.closest with context node 'test4' and selector '[default]'PASSPASSPASSPASSPASS
Element.closest with context node 'test4' and selector '[selected]'PASSPASSPASSPASSPASS
Element.closest with context node 'test11' and selector '[selected]'PASSPASSPASSPASSPASS
Element.closest with context node 'test12' and selector '[name="form-a"]'PASSPASSPASSPASSPASS
Element.closest with context node 'test13' and selector 'form[name="form-a"]'PASSPASSPASSPASSPASS
Element.closest with context node 'test9' and selector 'input[required]'PASSPASSPASSPASSPASS
Element.closest with context node 'test9' and selector 'select[required]'PASSPASSPASSPASSPASS
Element.closest with context node 'test13' and selector 'div:not(.div1)'PASSPASSPASSPASSPASS
Element.closest with context node 'test6' and selector 'div.div3'PASSPASSPASSPASSPASS
Element.closest with context node 'test1' and selector 'div#test7'PASSPASSPASSPASSPASS
Element.closest with context node 'test12' and selector '.div3 > .div2'PASSPASSPASSPASSPASS
Element.closest with context node 'test12' and selector '.div3 > .div1'PASSPASSPASSPASSPASS
Element.closest with context node 'test9' and selector 'form > input[required]'PASSPASSPASSPASSPASS
Element.closest with context node 'test12' and selector 'fieldset > select[required]'PASSPASSPASSPASSPASS
Element.closest with context node 'test6' and selector 'input + fieldset'PASSPASSPASSPASSPASS
Element.closest with context node 'test3' and selector 'form + form'PASSPASSPASSPASSPASS
Element.closest with context node 'test5' and selector 'form + form'PASSPASSPASSPASSPASS
Element.closest with context node 'test10' and selector ':empty'PASSPASSPASSPASSPASS
Element.closest with context node 'test11' and selector ':last-child'PASSPASSPASSPASSPASS
Element.closest with context node 'test12' and selector ':first-child'PASSPASSPASSPASSPASS
Element.closest with context node 'test11' and selector ':invalid'PASSPASSPASSPASSPASS
Element.closest with context node 'test4' and selector ':scope'PASSPASSPASSPASSPASS
Element.closest with context node 'test4' and selector 'select > :scope'PASSPASSPASSPASSPASS
Element.closest with context node 'test4' and selector 'div > :scope'PASSPASSPASSPASSPASS
Element.closest with context node 'test4' and selector ':has(> :scope)'PASSPASSPASSPASSFAIL