Subj : Re: Library scripts To : netscape.public.mozilla.jseng From : WhiteFire Date : Tue Oct 05 2004 09:05 pm Frank wrote: > hi, > > I was wondering if it's possible with the SpiderMonkey C API to load scripts > which act as libraries for other scripts. > > Let me explain: > The program (single thread) it's intended for has support for multiple > independent JS scripts (each having it's own JSContext). However, there may > be situations where some kind of library scripts could be very useful: > scripts which define some functions which then are available to all other > scripts. Any luck with this? I'd love to figure out how to do it myself. :) I've pondered the posibility of searching the global object of one script for user defined functions and making a reference to them from the other global object, but was unsure if you can share objects like that in a muti-threaded environment... Peter .