From: Leif Åstrand Date: Fri, 29 Jun 2012 12:38:03 +0000 (+0300) Subject: Restore static helper for executing JS that somehow went missing (#8907) X-Git-Tag: 7.0.0.alpha3~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=570401eea6984a9c822a68f0139eba5b4826045f;p=vaadin-framework.git Restore static helper for executing JS that somehow went missing (#8907) --- 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.