Subj : javascript function To : netscape.public.mozilla.jseng From : Béatrice Philippe Date : Thu Mar 24 2005 01:22 pm Hello ! i'm still interested in projects using spidermonkey and i have some questions: 1) in jsapi, is there any function to enumerate each statement (one by one) of a javascript function ? for example, we have the following function : "function fun1() { var i = 'mozilla.org'; var b = document.location.href = 'http://www.'+i; return b; }" i'd like to get the first statement "var i = ....", then the second statement "var b = ...." etc...in my array. 2) i tried the following function with no success: function fun2() { var a = new image(); } the evaluation fails on 'new image()'. why ? 3) and the last question: in my app, i tried to change an existing javascript function (retrieved from js_getProperty() in the global object), by a new one (i compiled a new body function, then i called js_defineProperty keeping the same function name). If my app calls this new function (like 'js_callFunction...'), it works well. But if another javascript function calls this new function, it fails. It seems to be difficult to change an existing javascript function (in the dom) to a new one even if we want to keep the same function name. Any solution ? Thank you very much. -- Béatrice Philippe beatrice.derbez.bd@wanadoo.fr .