Subj : Re: [SpiderMonkey]Simple Code To : netscape.public.mozilla.jseng From : ma2thieul Date : Mon Jul 05 2004 02:10 am Brendan Eich wrote in message news:<40E5A01E.1000507@meer.net>... > Jens Thiele wrote: > >> char * script="document.write('hello');"; > >>The JS_EvaluateScript function returns JS_FALSE. Do you see why? > > > > > > yes the document object does not exist > > And the embedding program should use JS_SetErrorReporter, so you can see > the "document is not defined" error. > > /be You're right! I used the JS_SetErrorReporter function and see the issue. Thanks a lot for your help! :) Matthieu .