Is it possible to use HTML's .querySelector() to select by xlink attribute in an SVG?
问题 Given: <body> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <a xlink:href=\"url\"></a> </svg> </body> Is it possible to use the HTML DOM\'s .querySelector() or .querySelectorAll() to select the link inside the SVG by the contents of its xlink:href attribute? This works: document.querySelector(\'a\') // <a xlink:href=\"url\"/> These don\'t: document.querySelector(\'[href=\"url\"]\') // null document.querySelector(\'[xlink:href=\"url\"]\') // Error: not