4

Do any browser vendors support the use of any scripting languages besides

  • text/javascript
  • text/vbscript (IE only)

for example:

  • text/lua
  • text/cs-script
  • text/php
  • text/tcl

If i wanted to use another scripting language in a browser:

<SCRIPT type="text/javascript">
   ...some JavaScript...
</SCRIPT>

<SCRIPT type="text/vbscript">
   ...some vbscript...
</SCRIPT>

<SCRIPT type="text/perl">
   ...some Perl Script...
</SCRIPT>

<SCRIPT type="text/php">
   ...some Php...
</SCRIPT>

<SCRIPT type="text/tcl">
   ...some Tcl...
</SCRIPT>

<SCRIPT type="text/lua">
   ...some Lua...
</SCRIPT>

<SCRIPT type="text/pascalscript">
   ...some PascalScript...
</SCRIPT>

<SCRIPT type="text/cs">
   ...some C#...
</SCRIPT>

could i?

Is there a way to register 3rd party scripting engines with any browser?

6 Answers 6

3

Technically, Internet Explorer can use any script language which provides an IActiveScript implementation, and I've seen implementations of both PERL (from ActiveState) and TCL running clientside in IE.

But to minitech's point, this isn't something that would work across browsers, and frankly it's a terrible idea in almost all circumstances.

1
  • 1
    There is a browser that does it, with a mechanism for it. Accepted answer to the question.
    – Ian Boyd
    Commented May 22, 2011 at 19:05
3

No. If you want to use a different language, your best bet is using something that compiles into JavaScript (eg Pyjamas for Python).

2

Google Chrome has a native code plugin, allowing the use of any language for which you have the correct plugin. For example, there is a Tcl implementation for it.

2

There is now brython to run python 3 programs:

see www.brython.info

Impressive work!

seem work across many browsers (I don't have IE)

... still waiting for a perl port...

0
1

There are what I consider hack-ish ways to do it which involves some kind of interpreter between the browser and the script language. Two examples of this are using SilverLight to interface with various dynamic languages, or JRuby to interface using Ruby script. Otherwise it has to get compiled to JS.

0

No, there isn't. Not any portable way, at least, and not anything you should do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.