Subj : Re: Spidermonkey DOM integration. To : netscape.public.mozilla.jseng From : "t o b e" Date : Mon Jan 05 2004 02:02 pm Just out of interest.. this is exactly what I've been doing the last 3 months. Although ou product *is* a browser. I took the autogeneration route. Parse the IDL, generate wrappers that call into a C version of the API which itself calls in to the browser to get stuff done. In my project the work's not so much been in the wrapper generation as hooking the C wrapper into the pre-existing browser. Toby Bradshaw -- Senior Engineer, Oregan Networks, London, UK. "Brendan Eich" wrote in message news:3FF85DBC.9060802@meer.net... > aadamov wrote: > > > I have an application in which I would like to do embed spidermonkey > > JS engine. However, application has data stored in DOM object that > > should be available to javascript engine. This is not a browser. > > I am looking for wrapper classes that would make DOM data available to > > SpiderMonkey. I expect the DOM schema to change and don't want it to > > be hardcoded in the wraper classes. I already started prototyping a > > solution, but it feels like reinventing the bycicle. Can anybody point > > me in the right direction or provide an example. > > Thank you, > > AA. > > > If you mean the w3c DOM, then you might use Mozilla's DOM .idl files, > which contain XPIDL (http://www.mozilla.org/scriptable/). You could go > further, and use XPCOM, XPConnect, and SpiderMonkey to glue your DOM > objects and JS together. > > But if you say the DOM schema will change, do you mean the DOM APIs > expressed in IDL? Or just particular document instances? > > /be .