16
  1. How many client-side scripting language implementations did you see except JavaScript and VBScript? Like: type="text/C++Script", text/CSharpScript, text/oberonScript, etc.

  2. How can I learn if my browser supports those languages?

Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
Slantroph
  • 255
  • 3
  • 8

2 Answers2

18

The only languages I have ever seen supported by web browsers in <script> elements are:

  • JavaScript / JScript (which is ubiquitous)
  • Webassembly (which is less of a language than a different target other languages can be compiled to) is well supported today)
  • VBScript (IE 10 and lower only)
  • PerlScript (IE with a plugin from ActiveState only)
  • Dart (in a nonstandard build of Chromium) which is not intended for production use.

The HTML 4 specification gives examples of Tcl, but I've never heard of a browser that implemented this.

In any practical sense (for WWW development), JavaScript and Webassembly is the only (not really a) choice.

There are also various languages (e.g. Dart, TypeScript, ES6/7) which have translators to convert programs to (ES5 flavoured) JavaScript which can then run in browsers.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
-5
  1. Is already answered above.
  2. If you want to learn if browser supports languages that you already know the best is to embed their small snippets into page or inject using innerHTML from JavaScript. These scripts should then set some global property like window['scripts']['oberon']=true; this way you will learn that language type was detected indeed.
gertas
  • 16,869
  • 1
  • 76
  • 58