aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/resources/com/vaadin/tests/components/javascriptcomponent/StateChangeCounter.js
blob: 79e2ef79a750f01dd28d9a4e1cc64eb118fecfde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
window.com_vaadin_tests_components_javascriptcomponent_StateChangeCounter_StateChangeCounterComponent = function() {
	var self = this;
	
	var logRow = function(text) {
		var child = document.createElement("div");
		child.className="logRow";
		child.textContent = text;
		self.getElement().appendChild(child);
	}
	
	this.onStateChange = function() {
		logRow("State change, counter = " + this.getState().stateCounter);
	}
	
	this.sendRpc = function() {
		logRow("RPC")
	}
}