It's from the early days where JavaScript was only for managing forms and animating or showing and hiding some things in onclick=""… I think there might have been something similar for frames in frameset too?
"when JavaScript was only for managing forms and animating or showing and hiding some things"
wdym that's still all javascript is for any other uses are heresy