| Summary: | Browser.evaluate always returns NULL on Win7 and SWT 3.6.1 | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Luca Viggiani <lviggiani> |
| Component: | SWT | Assignee: | Grant Gayed <grant_gayed> |
| Status: | RESOLVED NOT_ECLIPSE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe, lviggiani |
| Version: | 3.6.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I've found where the problem is... it behaves the same in XP with SWT 3.5.
You've to set an url before calling the evaluate method:
browser.setUrl("about:blank");
System.out.println(browser.evaluate("return 2;")); // prints 2.0
I'm not sure it is actually a bug, however it behaves differently from Mozilla or WebKit. But I guess it's IE not SWT.
|
Build Identifier: Helios Please consider this snippet Browser browser = new Browser (shell, SWT.NONE); // Uses Mozilla on Linux, WebKit on OSX and IE on Win System.out.println(browser.evaluate("return 2+2;"); it returns 4 on both Linux and OSX (any arch with SWT 3.6.1), but NULL on Win7 (I only tested on 32bit version with SWT 3.6.1) Reproducible: Always Steps to Reproduce: See Details