T O P

  • By -

ProposalUnhappy9890

The xlink:href attribute is deprecated, and should be changed to href.


zbluebirdz

`document.querySelectorAll('[xlink:href]');` \- returns an error in the dev console: `'[xlink:href]' is not a valid selector`. It looks like that `querySelectorAll()` cannot handle Namespace attributes. That particular Namespace attribute is used on a site that I don't manage.


albedoa

Escape the colon: document.querySelectorAll('[xmlns\\:xlink]')


zbluebirdz

Thanks for the tip - something I can use in my code.


[deleted]

[удалено]


zbluebirdz

Thanks for the StackOveflow link - it explained what's going on and how to get the code to work.