On Jul 3, 6:16 pm, [EMAIL PROTECTED] wrote: > Hi, > I need to add some new javascript objects in a ATF's Embedded > Browser instance (ATF Eclipse). Someone knows how to do this? I'm > calling the browser by: MozBrowserUtil.openMozillaBrowser(url) > > Thanks, > Victor Emanuel
Maybe you could do this by creating and adding a script-node to the DOM in the embedded browser. But as far as I know you can only invoke those scripts by writing your own xpcom component. Because with the MozillaBrowser execute method you can get no return value. With browser.getDocument(); you can get the nsIDOMDocument from the MozillaBrowser. Then you have to find the nsIDOMNode which you want to attach the script to. With node.appendChild(newnode); you can append a new child to the node you found. I have not tried this on my own... so please correct me if I'm wrong. Good Luck, Christopher _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
