summaryrefslogtreecommitdiffstats
path: root/WebContent/statictestfiles/jsextension.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebContent/statictestfiles/jsextension.js')
-rw-r--r--WebContent/statictestfiles/jsextension.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/WebContent/statictestfiles/jsextension.js b/WebContent/statictestfiles/jsextension.js
new file mode 100644
index 0000000000..df67db8927
--- /dev/null
+++ b/WebContent/statictestfiles/jsextension.js
@@ -0,0 +1,13 @@
+window.com_vaadin_tests_features_SimpleJavascriptExtensionTest_SimpleJavascriptExtension = function() {
+ var state = this.getState();
+ var greetBack = this.getRpcProxyFunction('com.vaadin.tests.features.SimpleJavascriptExtensionTest$SimpleJavascriptExtensionServerRpc', 'greet');
+
+ this.registerRpc("com.vaadin.tests.features.SimpleJavascriptExtensionTest.SimpleJavascriptExtensionClientRpc", {
+ 'greet': function(greeting) {
+ var response = window.prompt(state.prefix + greeting);
+ if (response !== null) {
+ greetBack(response);
+ }
+ }
+ });
+} \ No newline at end of file