diff options
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r-- | src/com/vaadin/ui/JavaScript.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/JavaScript.java b/src/com/vaadin/ui/JavaScript.java index d256717711..5905b56bfb 100644 --- a/src/com/vaadin/ui/JavaScript.java +++ b/src/com/vaadin/ui/JavaScript.java @@ -115,6 +115,16 @@ public class JavaScript extends AbstractExtension { } /** + * Executes the given JavaScript code in the browser. + * + * @param script + * The JavaScript code to run. + */ + public static void eval(String script) { + getCurrent().execute(script); + } + + /** * Get the JavaScript object for the current Page, or null if there is no * current page. * |