title: How to add JavaScript function in Vaadin with return value?
body: <p>In Vaadin it's possible to register a JavaScript function for example like this:</p>
  
  <pre><code>JavaScript.getCurrent().addFunction("openObj", new JavaScriptFunction() {
      private static final long serialVersionUID = 9167665131183664686L;
  
      @Override
      public void call(JsonArray arguments) {
          if (arguments.length() != 1) {
              Notification.show("Wrong arguments for openObj: " + arguments.asString());
              return;
          }
          openObject(arguments.get(0).asString());
      }
  });
  </code></pre>
  
  <p>Is it somehow possible to register a function which has a return value?</p>