When working with PHP, it is possible to use the getElementsByTagName method on any DOM object. However, this concept does not seem to exist in JavaScript.
For example, if we have a specific node stored in the variable detailsNode, attempting to use detailsNode.getElementsByTagName('summary') results in a firebug error stating that detailsNode.getElementsByTagName is not a function.
So, how can we target the getElementsByTagName() method to only search within a specified DOM element in JavaScript?
Thank you for any suggestions provided.
Please note that the solution must adhere to using straight up DOM2 methods without relying on jQuery (even though it would make things easier).