tests/reproducers/simple/JSToJFuncReturn/resources/JSToJava_FuncReturn.js
raw| 1 | function attemptFuncReturnTests() { |
| 2 | var urlArgs = document.URL.split("?"); |
| 3 | |
| 4 | var method = urlArgs[1]; |
| 5 | |
| 6 | eval('var value = applet.' + method + '()'); |
| 7 | |
| 8 | var checked_string = typeof (value) + ' '; |
| 9 | if (method === '_JSObject') { |
| 10 | checked_string = checked_string + value.key1; |
| 11 | } else { |
| 12 | checked_string = checked_string + value; |
| 13 | } |
| 14 | |
| 15 | applet.printStringAndFinish(checked_string); |
| 16 | } |
| 17 | |
| 18 | doTest(attemptFuncReturnTests, applet); |