Finally found out ...

nsCOMPtr<nsIWebBrowserSetup>mWebSetup =
do_QueryInterface(mWebBrowser,&rv);
        if (mWebSetup)
        {
                
mWebSetup->SetProperty(nsIWebBrowserSetup::SETUP_IS_CHROME_WRAPPER,PR_TRUE);

                
mWebSetup->SetProperty(nsIWebBrowserSetup::SETUP_ALLOW_PLUGINS,PR_TRUE);

                
mWebSetup->SetProperty(nsIWebBrowserSetup::SETUP_ALLOW_JAVASCRIPT,PR_TRUE);
                nsCOMPtr<nsIPrefService>
prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
        }

It comes from those lines :( Pretty wierd ....

Dek a écrit :

> I reply to myself ...
> I start to wonder if JS is activated :
> <html>
> <script language="Javascript">
>       function test() {
>               alert("ok");
>               document.body.innerHTML+="<br>From js";
>       }
> </script>
> <body onload='test();'>
> <noscript>noway!</noscript>
> </body>
> </html>
>
> With that html script, the noway is displayed and i never get the html
> generated from js called with the onload method. Is there something
> special to be done to activate js ? (It s weird because at
> http://www.google.com/ig?hl=en I can add content and move elements
> which i guess is done with javascript ... I am lost, could anybody help
> ?
>
> Thanks
>
> > Hi,
> >
> > I have successfully embedded mozilla in my application, but there is a
> > strange problem :(
> > Whenever the <noscript> tag is present it is executed eventhough
> > javascript is enabled and working ( I can do heavy stuff with
> > javascript or browse webiste that rely heavily on javascript).I have
> > tried to change the prefs and modify the javascript.enabled at true
> > (which was the default) but no success. I have tried to use the
> > ALLOW_JAVASCRIPT like this but it doesnt help.
> >
> > nsCOMPtr<nsIWebBrowserSetup>mWebSetup =
> > do_QueryInterface(mWebBrowser,&rv);
> > mWebSetup->SetProperty(nsIWebBrowserSetup::SETUP_ALLOW_JAVASCRIPT,PR_TRUE);
> >
> > I dont know where to look and I have been searching on the web and
> > inside the source to try to figure it out but no clue... If anyone has
> > any idea please share it.
> > 
> > Thanks for ready and your replies.

_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to