ParentNode-querySelectors-space-and-dash-attribute-value.html (713B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>querySelector(All) must work for attribute values that contain spaces and dashes</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <!-- Regression test for https://github.com/jsdom/jsdom/issues/2542 --> 7 8 <a title="test with - dash and space" id="testme">Test One</a> 9 10 <script> 11 "use strict"; 12 const el = document.getElementById("testme"); 13 14 test(() => { 15 assert_equals(document.querySelector("a[title='test with - dash and space']"), el); 16 }, "querySelector"); 17 18 test(() => { 19 assert_array_equals(document.querySelectorAll("a[title='test with - dash and space']"), [el]); 20 }, "querySelectorAll"); 21 </script>