Browser.execute() issue [message #105543] |
Thu, 18 September 2008 05:42  |
Eclipse User |
|
|
|
Hi,
The Browser.execute() is not working for me. It always returns false and
no script is executed. I'm running Ubuntu with Firefox. I've noticed this
while porting our RCP application. But even the simplest scenario (
browser.execute("alert('Hello world')" call in RAP Workbench demo )
produces the same result.
Regards, Martin Schmied
|
|
|
|
|
|
Re: Browser.execute() issue [message #105640 is a reply to message #105624] |
Fri, 19 September 2008 02:42   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Martin,
thanks for your investigation. When using the Browser widget please
bear in mind that it is represented by an IFRAME element on the
client-side. Therefore its general use is limited by implementation
details that vary on different browsers and security restrictions.
Plus user-specific security settings may restrict its features further.
It seems to be a bug that 'this.getContentWindow()' returns null.
Feel free to open a bugzilla if you have a code snippet to reproduce
the behavior.
The 'permission denied' exception, to me looks like a security
restriction that cannot be overcome, except maybe by altering the
client-side security settings.
Cheers,
Rüdiger
Martin Schmied wrote:
> Hi Rüdiger,
>
> thanks for responding. My original setup uses RAP 1.1 I've tried Firefox
> and Opera with the same negative result. Then (already at my laptop
> running Windows Vista) I switched to CVS bundles as you proposed, added
> some JS debugging code and here's the result:
>
> On Firefox and Opera the 'this.getContentWindow()' statement returns
> null causing the subsequent evaluation to throw a NPE
>
> On IE7 the context window is indeed returned, but "Permission denied"
> exception is thrown from the evaluation.
>
> One way or another, the Browser.execute() always fails.
>
> Regards, Martin Schmied
>
|
|
|
|
|
|
|
Re: Browser.execute() issue [message #106254 is a reply to message #106148] |
Thu, 25 September 2008 06:58  |
Eclipse User |
|
|
|
Hi Rüdiger,
first of all - thank you very much for your help. Unfortunately the script
you've attached to your last post worked exactly the same as the original
one. I think the problem is really a security issue and not a problem of
delayed DOM creation - when I run RAP controls demo, then with custom HTML
page (via setText()) inside the browser everything works fine -> load page
from URL -> run the JS -> script execution fails with the mentioned NPE.
The inaccessible iframe DOM element is confusing, but still I do think
it's a security issue you can do nothing about. Thanks again for your
thoughts :)
Regards, Martin
|
|
|
Powered by
FUDForum. Page generated in 0.07534 seconds