Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Register scripting language with browser?

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?

like image 806
Ian Boyd Avatar asked Dec 22 '22 13:12

Ian Boyd


2 Answers

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.

like image 143
EricLaw Avatar answered Jan 04 '23 14:01

EricLaw


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

like image 31
LaC Avatar answered Jan 04 '23 14:01

LaC