X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=test%2FAFB.html;h=a1a4bf59d56ef3ae97861ab9a7daed561aa79692;hb=94ad734842c1359a012f9850b851063637d3e061;hp=344eb1588a667fe830b700f13678b11f3756d9f2;hpb=ec24258a5e9d39b5fd1d4f127d2d335a853e0fe5;p=src%2Fapp-framework-binder.git diff --git a/test/AFB.html b/test/AFB.html index 344eb158..a1a4bf59 100644 --- a/test/AFB.html +++ b/test/AFB.html @@ -9,6 +9,7 @@ function onopen() { document.getElementById("main").style.visibility = "visible"; document.getElementById("connected").innerHTML = "Connected to WebSocket server"; + ws.onevent("*", gotevent); } function onabort() { document.getElementById("main").style.visibility = "hidden"; @@ -23,10 +24,13 @@ function replyerr(obj) { document.getElementById("output").innerHTML = "ERROR: "+JSON.stringify(obj); } + function gotevent(obj) { + document.getElementById("outevt").innerHTML = JSON.stringify(obj); + } function send(message) { var api = document.getElementById("api").value; var verb = document.getElementById("verb").value; - ws.call(api, verb, {data:message}, replyok, replyerr); + ws.call(api+"/"+verb, {data:message}).then(replyok, replyerr); } @@ -38,5 +42,6 @@ VERB:
Enter Message:
Server says...
+ Events: