For widgets only - because scripts and UDIXes are web workers, and have no HTML document - the framework creates a $$() short-hand for accessing DOM nodes. For example:
$$("btnSave").disabled = true;
$$() is simply a short-hand alternative to document.getElementById(x), though its full functionality is slightly broader. If there is no DOM node with ID x, then $$() goes on to try document.getElementsByClassName(x). There are three possible results from getElementsByClassName():
Empty array. $$() returns null.
Array with single item. $$() returns that single item (not the array).
Array with multiple items. $$() returns the array.
To put all that another way:
If there is a single node with class=x, then $$(x) is equivalent to document.getElementsByClassName(x)[0]
If there are multiple nodes with class=x, then $$(x) is equivalent to document.getElementsByClassName(x)