getElementsByAttribute() is not a function
Is it not a chrome standard function?
No, it isn't.
From MDN:
Note that this method is only available on XUL elements; it is not part of the W3C DOM.
Consider using querySelectorAll
with an attribute selector instead.
From documentation:
Note that this method is only available on XUL elements; it is not part of the W3C DOM.
Use this:
document.querySelectorAll("[xlink|href='"+id+"']");