Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Using Browser.evaluate and Browser.execute in non-top window contexts?
Using Browser.evaluate and Browser.execute in non-top window contexts? [message #558558] Mon, 13 September 2010 13:45 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: July 2009
Junior Member
I use a Browser widget (with the default IE browser) to load a page that contains a frameset that refers to documents from different security domains.

The Browser API javadocs refer to the "context of the current document.". Unfortunately , this is appears to be limited to the document in the top window.

Does anyone know of a trick to invoke Browser.evaluate or Browser.execute in the context of a document in a non-top window (e.g., a frame or iframe)?

Re: Using Browser.evaluate and Browser.execute in non-top window contexts? [message #558808 is a reply to message #558558] Tue, 14 September 2010 13:58 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

If accessing a frame by name (eg.- browser.execute("frames['name'].foo()")
is failing due to a security restriction then I don't think there's
currently support for what you need, since execute()/evaluate() always
happens in the top-level document. You may be able to get this working by
duplicating-then-tweaking the browser's current execute() implementation.
For example, in IE.execute() it invokes execScript on an IHTMLWindow. If
you had the IHTMLWindow from a child frame instead then invoking execScript
on it would probably be executed directly there.

Suggesting that you do this is obviously not ideal. If you log a Feature
Request with SWT at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT&bug_severity=enhancement
then this can be considered for future inclusion in SWT.

Grant


<bjhellstrom@hotmail.com> wrote in message
news:i6l9t5$dr2$1@build.eclipse.org...
>I use a Browser widget (with the default IE browser) to load a page that
>contains a frameset that refers to documents from different security
>domains.
> The Browser API javadocs refer to the "context of the current document.".
> Unfortunately , this is appears to be limited to the document in the top
> window.
>
> Does anyone know of a trick to invoke Browser.evaluate or Browser.execute
> in the context of a document in a non-top window (e.g., a frame or
> iframe)?
>
>
Previous Topic:Custom widget problem
Next Topic:CTRL+Enter in a Textbox in a Wizard
Goto Forum:
  


Current Time: Wed Sep 25 12:00:57 GMT 2024

Powered by FUDForum. Page generated in 0.25209 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top