Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] help:why swt browser and xulrunner...


It looks like mozilla stopped looking at some or all of these settings as of 1.9.  Try your case in a stand-alone firefox >= 3.0 (firefox 3.0.x == xulrunner 1.9.0.x, firefox 3.5.x == xulrunner 1.9.1.x) and you will see that these settings have no effect there either.  So the cause is a behaviour change in mozilla.

Grant




"SerapH." <konglingpeng@xxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

10/28/09 09:33 PM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-swt-dev] help:why swt browser and xulrunner...





new discover:
xulrunner1.8.1.3 works
xulrunner-sdk1.9.1.3/xulrunner1.9.0.15/xulrunner1.9.2.3583 not work

i just change code:
System.setProperty("org.eclipse.swt.browser.XULRunnerPath", new
File("E:\\jar\\xulrunner1.9.0.15").getAbsolutePath());

please,what's the reason?

On 10/29/09, SerapH. <konglingpeng@xxxxxxxxx> wrote:
> i test again,it seams window.alert works,but onbeforeunload,onunload
> doesn't work all the same:
> //////////////////////////
> browser.addProgressListener(new ProgressAdapter() {
>                                                    public void completed(ProgressEvent event) {
> boolean b=browser.execute("var f=self.frames;
> window.alert=null;window.prompt=null;window.confirm=null;window._onunload_=null;window._onbeforeunload_=null;
> if(f.length>0){ for(var i=0;i<f.length;i++) {
> f[i].window.alert=null;f[i].window.prompt=null;f[i].window.confirm=null;f[i].window._onunload_=null;f[i].window._onbeforeunload_=null;
> } }");
> System.out.println(b);
> browser.setUrl("http://www.google.com");
> }
> });
> browser.setUrl("http://www.forexapocalypse.com/?hop=pinebux");
> ///above is my code prevent pop alert at first,it works well
>
> after i add :
> user_pref("capability.policy.default.Window.alert", "noAccess");
> user_pref("capability.policy.default.Window.confirm", "noAccess");
> user_pref("capability.policy.default.Window.onbeforeunload", "noAccess");
> user_pref("capability.policy.default.Window.onunload", "noAccess");
> user_pref("capability.policy.default.Window.open", "noAccess");
> user_pref("capability.policy.default.Window.prompt", "noAccess");
> to the prefs.js file,and delete the js execute code in complete
> event,the pop alert again,
> so why?
> i test firefox,after add capability.policy parameter,it works well.....
>
>
>
>
>
>
>
>
>
> On 10/28/09, Grant Gayed <Grant_Gayed@xxxxxxxxxx> wrote:
>> Hi,
>>
>> This works for me with xulrunner 1.8.1.3 and 1.9.1.  However, instead of
>> creating the prefs.js file myself I had mozilla write it, which could be
>> the difference.  Try the following:
>>
>> - launch an swt Browser with style SWT.MOZILLA
>> - navigate to about:config
>> - right-click in the preferences table and select New > String
>>   -> set its name and value in the subsequent prompters
>> - close your swt app
>> - take a look at C:\Documents and Settings\Administrator\Application
>> Data\Mozilla\eclipse\prefs.js
>>
>> My test case was to set "capability.policy.default.Window.open" to
>> "noAccess", and then I viewed the page below.
>>
>> <html>
>> <script type="text/_javascript_">
>>     setTimeout("window.open('http://www.eclipse.org', 'Dialog',
>> 'width=400, height=400');", 3000);
>> </script>
>> <body>
>> This test uses _javascript_ to open a new window after 3 seconds.
>> </body>
>> </html>
>>
>> HTH,
>> Grant
>>
>
>
> --
> Best Regards!
> _____________________________________________
>
> kongpeng
> tel:13954108798
> QQ:38641071
> http://happy100.blogspot.com
>


--
Best Regards!
_____________________________________________

kongpeng
tel:13954108798
QQ:38641071
http://happy100.blogspot.com
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top