Disclaimer: I'm a backender so I may have this all wrong :)
The script element in HTML has provided the language property since its introduction, though nowadays it is deprecated in favour of the type attribute.
But the browser-supported languages seems to have been almost entirely Javascript and VBScript.
Given that Javascript is considered to be an at best quirky [0] language (justifiably given its 10 day gestation) how come the browser ecosystem never expanded to accommodate more direct scripting languages - particularly in the early days when Javascript libraries were rare beasts? As I remember it Javascript was deeply unpopular with devs until libraries like JQuery came along to make things a little less painful.
Was it the baleful influence of IE6 or some other winner-takes-all effect or what?
[0] https://www.goodreads.com/book/show/2998152-javascript
Cross platform support across many vendors has always been hard. Look at cross platform libraries in C. Different compilers, OS, and std library implementations. Python or Ruby on the other hand have one “vendor” that works to make the runtime consistent on different platforms.
So for something like Python or Ruby to work well, it’d need to either be:
1. A central vendor driving development, who would need to manage and install a runtime on your computer
Or
2. All browser vendors have to buy into a single spec and make a very consistent implementation across their browsers.
Or
3. Compile to JavaScript (or web asm etc)
For (2) browser vendors already invest heavily in JavaScript and have a hard time keeping up! For (1) I’m not sure why any language vendor cares to try to compete with JavaScript seriously. The browser is quite different environment than the CLI or Desktop that it’d be a significant investment without clear upside.
We do see (3) with Typescript and Coffeescript. These create some debugging friction. Also as JavaScript gets marginally better the appeal of these other languages can feel more niche, and many people just use the common denominator.