The alternative all depended on non technical users with slow connections to install the runtime.
Js code was guaranteed to work anywhere, and with no requirements, giving it practical monopoly.