The standard API with which JavaScript interacts with a webpage is called the Document Object Model.
Throughout the years, the DOM has undergone several major revisions, which the W3C called "levels" (for some reason). These were breaking changes: some methods' behaviors changed subtly, while others were completely removed.
document.getElementsByTagNameNS()
was one such casualty. In DOM level 3, its return value was of type
NodeList
, but in DOM level 4 it was changed to be
HTMLCollection
; it remains that way in the current standard (no
longer called a "level"). The reasons for this change included the fact that it
was approximately what Firefox and Opera were already doing, and that the DOM
could now formally rely on the HTML spec.
This page simply includes a script to test what type that method actually returns on your browser: if you see anything other than "HTMLCollection: DOM4-compliant" at the top of the page, you might want to consider updating.