Is your programming language in the browser (i.e. Javascript)?

Is it possible to write a plugin that allows executing client-side scripts in a browser in a language other than Javascript (take your choice - TCL, Rebol, Perl, Ruby, Python, Lisp, etc.).

To clarify, I am NOT talking about browser plug-ins that allow "applets" for certain languages ​​to run in the browser - I know that this was done. I ask if it is possible to use a language other than Javascript (or something else) for HTML scripts using a plugin or other means? I am talking about [embed your language] between tags <script>...</script>.

My guess is that this has not yet been done. If so, because it is simply difficult / impossible?

Thank.

+5
source share
2 answers

For your own browser doable. For everything that you want to place on a public website, you will first need wide distribution, therefore: no, it is impossible. You must adhere to JavaScript.

You can compile your language to JavaScript if this works for your script, as the Google Web Toolkit does. Or write an interpreter for it in JavaScript.

+1
source

There are many compilers and interpreters that translate other languages ​​into JavaScript .

For example, you can run .NET languages ​​in a browser using JSIL or JVM languages ​​in a browser using DoppioJVM .

0
source

All Articles