SWT 4.4 M5 and XULRunner 24 [message #1263453] |
Tue, 04 March 2014 13:47 |
Adam Dec Messages: 14 Registered: March 2014 |
Junior Member |
|
|
Hi!
I am testing SWT 4.4 M5 and XULRunner 24 (64b)
My setup: Windows 7 64b, JDK7u51 (64b)
When I try to execute some javascript on the page using:
browser.execute("some javascript");
or even...
browser.evaluate("some javascript");
Than nothing happens...first one returns false and second one returns null...
Everything is working on XULRunner 10 (64b)
Any ideas?
Regards,
Adam
[Updated on: Tue, 04 March 2014 15:34] Report message to a moderator
|
|
|
|
|
|
Re: SWT 4.4 M5 and XULRunner 24 [message #1264762 is a reply to message #1264598] |
Wed, 05 March 2014 13:33 |
Adam Dec Messages: 14 Registered: March 2014 |
Junior Member |
|
|
BrowserFunction implementation:
public class ExceptionHandler extends BrowserFunction {
private static final Logger LOGGER = LoggerFactory.getLogger(ExceptionHandler.class);
public ExceptionHandler(final Browser browser) {
super(browser, ExceptionHandler.class.getSimpleName());
}
@Override
public Object function(Object[] arguments) {
if (arguments.length > 0) {
LOGGER.error("JavaScript exception caught={}", arguments[0]);
}
return null;
}
}
JavaScript:
try {
return window.document.getElementById("hplogo").title;
} catch(e) {
ExceptionHandler(e.toString());
}
Run on: www.google.pl
Expected output is: Google
On XULRunner 10 it is working...when I mees with JavaScript than my handler is logging exception
On XULRunner 24 it is not working...no output and no exception...no nothing
I am invoking browser.evaluate(); function.
[Updated on: Wed, 05 March 2014 13:36] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07009 seconds