org.eclipse.swt.browser.Browser.evaluate(String) and org.eclipse.swt.browser.BrowserFunction.execute(Object[]) methods send values back and forth between JavaScript and Java.
If the values being passed are types , types get converted. The table below shows the type conversions that happen. Attempts to pass an unsupported type will cause an SWTException.
JavaScript Type |
Java Type |
|---|---|
| null | null |
| undefined | null |
| number | java.lang.Double |
| string | java.lang.String |
| boolean | java.lang.Boolean |
| array of supported types | java.lang.Object[] of supported types |
Pingback: Riding the Editor Life Cycle | Dean on Eclipse