Subj : Library scripts To : netscape.public.mozilla.jseng From : Frank Date : Sun Oct 03 2004 07:03 pm 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. I guess this could be done with a native include function ( "include('library.js');" ? ), but that way the variable space isn't shared (suppose one would want a library function just counting the number of calls to it, from all scripts). So my question is: is it possible to do such a thing in a neat way? Regard, Frank Zijlstra .