From what I can see from looking at complex documentation very quickly
https://www.w3.org/TR/DOM-Level-2-HTML/html.html circa 2000
Mentions class used by CSS and user-agents, but not JavaScript.
https://www.w3.org/TR/dom/ circa 2015
Has quite a bit about JavaScript as does
https://dom.spec.whatwg.org June 10 2016
TBH I can’t recall exactly when getElementsByClassName
had enough browser support for me to consider using it instead of “id”
For some reason I’m thinking it was around the same time as querySelector
in any case, querySelector
has been a thing from at least 2013
https://dev.w3.org/2006/webapi/selectors-api2/
and if my memory serves, getElementsByClassName
for at least about as long.