tags:

views:

315

answers:

2

Hi, I would like to use SpiderMonkey ( the javascript engine from Mozilla ) in my application. I want to use the js3250.dll shipped with firefox but i have a pb from the very beginning. It seems that the JS_NewRuntime method is not available anymore (according to the depends tool ). Any idea how to embed the javascript engine into another app ( C or Python) ?

Thx

A: 

JS_NewRuntime should certainly still be available.

There is a lot of documentation available in the MDC. I would start with the embedding tutorials linked on this Mozilla page if you're starting from ground zero.

Prestaul
Hi, this is exactly what i have started to do, but i can't find the entry point for the engine ( JS_NewRuntime ) . Do you know if js3250.dll contains this function on Win32?
Dave
It certainly does. I'm using it in this way: _runtime = JS_NewRuntime(256L * 1024L * 1024L);
Prestaul
Ah. In jsapi.h you'll see it's definition: #define JS_NewRuntime JS_Init
Prestaul
Thx , it works, that was the issue ( i was using it from a foreing function interface lib (ctypes in python) and i didn't have the jsapi.h )Many thx
Dave
A: 

see also the source code for JSDB which uses spidermonkey.

Jason S