aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/statictestfiles/jsconnector.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebContent/statictestfiles/jsconnector.js')
-rw-r--r--WebContent/statictestfiles/jsconnector.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/WebContent/statictestfiles/jsconnector.js b/WebContent/statictestfiles/jsconnector.js
new file mode 100644
index 0000000000..db8a065e86
--- /dev/null
+++ b/WebContent/statictestfiles/jsconnector.js
@@ -0,0 +1,12 @@
+window.com_vaadin_tests_components_javascriptcomponent_BasicJavascriptComponent_ExampleWidget = function() {
+ var connector = this;
+
+ var rootElement = connector.getWidgetElement();
+ rootElement.innerHTML = 'Hello world!';
+ rootElement.onclick = function() {
+ connector.getRpcProxyFunction("com.vaadin.tests.components.javascriptcomponent.BasicJavascriptComponent$ExampleClickRpc", "onClick")("message");
+ }
+ connector.onStateChange = function() {
+ console.log('state change:', this.getState());
+ }
+} \ No newline at end of file