I think you made a typo, getElementTagName should be getElement*sBy*TagName same thing for ClassName. Also TagName and ClassName returns an array of nodes, while getElementById will return first node on the tree.
Also I always wondered, will getElementsByTagName work on custom elements or react components?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think you made a typo,
getElementTagName
should begetElement*sBy*TagName
same thing for ClassName. Also TagName and ClassName returns an array of nodes, while getElementById will return first node on the tree.Also I always wondered, will getElementsByTagName work on custom elements or react components?