Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Browser.evaluate() hangs

Hi all,

I'm using Browser.evaluate() to run _javascript_ inside a loaded web page.
(org.eclipse.swt.browser.Browser)

The browser is running with a loop like this:
        while ( !shell.isDisposed() ) {
            if (!display.readAndDispatch())
                display.sleep();
        }

and the call to run _javascript_ was made using asyncExec to ensure running on the UI thread:
        display.asyncExec( new Runnable(
               @Override
                public void run() {
                     Object[] dataArray = (Object[]) browser.evaluate(JS_TextExtract);
                }) );

but it apprears that sometime this method never returned (or never invoked?)
I have verified that the _javascript_ works correctly on the same page loaded from firefox.
(the _javascript_ was run in firefox from the bookmark with "_javascript_:...").

This bug appears inconsistently, so I don't know what's causing it. Could someone suggest
me where to look at to fix this problem?


Thank you.
Yuhan

Back to the top