From 570401eea6984a9c822a68f0139eba5b4826045f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 29 Jun 2012 15:38:03 +0300 Subject: [PATCH] Restore static helper for executing JS that somehow went missing (#8907) --- src/com/vaadin/ui/JavaScript.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 @@ -114,6 +114,16 @@ public class JavaScript extends AbstractExtension { getRpcProxy(ExecuteJavaScriptRpc.class).executeJavaScript(script); } + /** + * 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. -- 2.39.5