Invoking Javascript code from Panorama

According to the new documentation for web browser programming,

To invoke JavaScript code from Panorama, use the script (or javascript) action. This action requires two additional parameters - the JavaScript code to run, and a field or variable where the result returned from JavaScript should be placed.

objectaction objectID,"script","... javascript code ...",result

The result parameter is optional. You should leave this parameter off if the JavaScript code doesn’t return a value . . .

Before b31, doing what I could with Javascript with minimal documentation, I found that the fourth objectaction parameter was not optional. Reading the above in this context I assumed that had changed in b31 (and b32), but it seems not… Omitting a variable in which to return a result results in the error

ObjectAction: parameter is missing

Not a major point, but it would be tidier, and make code less obscure, not to have to supply a return variable if there will be no value returned by the Javascript.

I think you must be using WebView, not WKWebView. This will happen if you’re using OS X 10.12 Sierra, or if you’ve set the Web Browser object to use the WebView class.

When using WKWebView, the result parameter can be left off. In fact, there are several places in the code of the Help wizard where this is done, so I know it works. But if you are using WebView, the result parameter is not optional. Please take careful note of the italicized sentence from the Web Browser Programming page: