Search code examples
internet-explorerfirefoxgoogle-chromeprogramming-languagesclient-side-scripting

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?


Solution

  • 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.