When referring to elements in HTML forms I often use the name/value of the name attribute. So, if the name of the form is "form01", I refer to the form writing document.forms.form01. Here is an example:
let title = document.forms.form01.title;
console.log(title.value);
<form name="form01">
<input type="text" name="title" value="Hello World">
</form>
The document.forms is a HTMLCollection, but in the documentation for the DOM Standard #interface-htmlcollection it says nothing about the possibility of using a name directly as a property (I think it is called a "named property") on a collection like that -- like when I use document.forms.form01 to refer to the form element. On the contrary the documentation actually notes that this is "a historical artifact" -- so, should I avoid using it?
Can you help me find documentation for this? Either that it is a (nice) feature that can be used or that it is something that should be avoided.