I had an idea for a client-side language other than JavaScript, and I’d like to look into developing a Firefox plugin that would treat includes of this new language in a page, like <script type=’newscript’ src=’path/script.ns’ />, just as if it were a natively supported language. The plugin would do all of the language parsing and ideally be able to perform every operation on the browser and the html and css within the web page just as JavaScript can.
I’ve done a bunch of Googling and have found some articles on writing basic Firefox plugins, but nothing as complicated as this.
Is this even possible?
@Nathan de Vries: no, actually, NPAPI plugins you suggested don’t let one implement support for
<script type=...>.OP: this is not easy, but look for PyDOM and PyXPCOM – language bindings for Python. The former does exactly what you asked for – for Python, but I’m unsure about its current status. In any case, it’s very likely that you need to create your own build of Firefox to support additional script types.