Subj : Re: kill executing script... To : Brendan Eich From : Oystein Hallaraker Date : Tue Jun 29 2004 11:24 am Brendan Eich wrote: > Oystein Hallaraker wrote: > >> Hi! >> Does anyone know how to kill an executing script before it is done? > > > Do you mean stop execution from within a native function, getter/setter, > etc.? Return false (after setting a pending exception or reporting an > error, if possible -- otherwise you are intentionally creating a silent > stop condition). > I tried returning false to the jsengine from a native() call, and that will stop execution of the current script. But what I really wanted was a way to asyncronously stop the script execution (without having to return false to the engine). Is this possible? >> (can I use JS_DestroyContext()...?) > > > No, that will crash. > >> And is it possible to disable all scripts from a domain while mozilla >> is running? I have been looking at the nsScriptSecurityManager, but it >> dosn't seem to have functionality to support this. > > > You could easily extend the system to support such disabling based on > domain. Are you looking to make something work on existing releases of > Mozilla products, just by using JS? I don't know of a way to do that. > > This is really a news://news.mozilla.org/netscape.public.mozilla.dom > question. > > /be .