javascriptjavabrowserswtxpcom

SWT Browser when is executed JavaScript "successful"?


I was wondering - when calling the org.eclipse.swt.browser.Browser method execute,

Thanks in advance!

edit:
I just checked: the browser does not wait for callbacks to be called


Solution

  • As far as I can tell from digging in the source code, the result will be decided by either of the following methods:

    So it sounds like, if there's no error, true will be returned.


    As far as the async part of your question is concerned, the Browser will not wait for the execution of the async task. What you can do, however, is define a BrowserFunction (as shown in this example) and call that method from JavaScript when you're done with your async task.