]> source.dussan.org Git - vaadin-framework.git/commitdiff
Restore static helper for executing JS that somehow went missing (#8907)
authorLeif Åstrand <leif@vaadin.com>
Fri, 29 Jun 2012 12:38:03 +0000 (15:38 +0300)
committerLeif Åstrand <leif@vaadin.com>
Fri, 29 Jun 2012 12:38:22 +0000 (15:38 +0300)
src/com/vaadin/ui/JavaScript.java

index d25671771121c2bd0ed227d30c2f0a3e73ab6919..5905b56bfb266d8d88075e5a309acdc2cc1c07bf 100644 (file)
@@ -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.