In my project, there's a case where a library generates elements, and I need to select specific elements from there - which happen to contain an attribute with ":".
In other words, I ended up attempting to select using: document.querySelectorAll("[xml:space]")
.
But, when tested in Chrome, it didn't work, nor selecting using document.querySelectorAll("['xml:space']")
- they both threw a DOMException
:
https://i.sstatic.net/AHIeB.png
My question is, how to make the above selector return the list of the elements with xml:space
attribute?
Thanks!
'[xml\\3A space]'
see mothereff.in/css-escapes – Outcaste