diff options
Diffstat (limited to 'src/com/vaadin/terminal/AbstractJavascriptExtension.java')
-rw-r--r-- | src/com/vaadin/terminal/AbstractJavascriptExtension.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/AbstractJavascriptExtension.java b/src/com/vaadin/terminal/AbstractJavascriptExtension.java new file mode 100644 index 0000000000..e741e2af1e --- /dev/null +++ b/src/com/vaadin/terminal/AbstractJavascriptExtension.java @@ -0,0 +1,20 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ + +package com.vaadin.terminal; + +import com.vaadin.ui.JavascriptCallback; + +public class AbstractJavascriptExtension extends AbstractExtension { + private JavascriptRpcHelper rpcHelper = new JavascriptRpcHelper(this); + + protected void registerCallback(String functionName, + JavascriptCallback javascriptCallback) { + rpcHelper.registerCallback(functionName, javascriptCallback); + } + + protected void invokeCallback(String name, Object... arguments) { + rpcHelper.invokeCallback(name, arguments); + } +} |