Subj : synchronisation of js runtime To : netscape.public.mozilla.jseng From : Timm Coerrens Date : Wed Dec 31 1969 04:00 pm Hi, My app uses gecko as GUI for a c++-application. I manipulate the DOM through XPConnect in order to show some content (html). I also use some javascript functions in the html-code for image-changing and others. I now want to know, if i can synchronize the access to the DOM, so that js and c++ runtime don't interfere. Now sometimes the engine crashes (NetscapeDispatchWnd) when the access from c++-side is too fast (js hasn't completed its action before c++-access). I think i have to get control over the js-runtime. Example: onMouseDown="imagechange();" onMouseUp="imagechange();sendIt(this.id);" 'sendIt' makes the connection to the application thread, which then evaluates the id and generates some new content (DOM). I thought, when sendIt is the last function, the js-function imagechange() has finished. Sometimes it hasn't, and the application thread tries to modify the DOM too, what causes a crash. Can someone help me with this? Is there a synchronization method for this? greetings Timm .