Skip to content

Commit

Permalink
Clarify executeJs JavaDocs for return values (#6815)
Browse files Browse the repository at this point in the history
Fixes #6791

(cherry picked from commit feb1648)
  • Loading branch information
Legioth authored and Joni Uitto committed Nov 7, 2019
1 parent d91678e commit 1764bca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ public ExecutionCanceler executeJavaScript(String expression,
/**
* Asynchronously runs the given JavaScript expression in the browser.
* <p>
* It is possible to get access to the return value of the execution by
* registering a handler with the returned pending result. If no handler is
* registered, the return value will be ignored.
* The returned <code>PendingJavaScriptResult</code> can be used to retrieve
* any <code>return</code> value from the JavaScript expression. If no
* return value handler is registered, the return value will be ignored.
* <p>
* The given parameters will be available to the expression as variables
* named <code>$0</code>, <code>$1</code>, and so on. Supported parameter
Expand Down
7 changes: 4 additions & 3 deletions flow-server/src/main/java/com/vaadin/flow/dom/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -1669,9 +1669,10 @@ public void executeJavaScript(String expression,
// When updating JavaDocs here, keep in sync with Page.executeJavaScript
/**
* Asynchronously runs the given JavaScript expression in the browser in the
* context of this element. It is possible to get access to the return value
* of the execution by registering a handler with the returned pending
* result. If no handler is registered, the return value will be ignored.
* context of this element. The returned
* <code>PendingJavaScriptResult</code> can be used to retrieve any
* <code>return</code> value from the JavaScript expression. If no return
* value handler is registered, the return value will be ignored.
* <p>
* This element will be available to the expression as <code>this</code>.
* The given parameters will be available as variables named
Expand Down

0 comments on commit 1764bca

Please sign in to comment.