Add redirection feature for plugins
Change-Id: I492eb833577aaed6b36d540dae30ead0e8dd6839
diff --git a/dev/demo/plugin-client.html b/dev/demo/plugin-client.html
index 44333f8..08e6034 100644
--- a/dev/demo/plugin-client.html
+++ b/dev/demo/plugin-client.html
@@ -51,11 +51,31 @@
}
};
};
+
+ function redirect() {
+
+ KorAPlugin.requestMsg({
+ "action":"get",
+ "key": 'QueryParam'
+ }, function (d) {
+
+ const par = d.value.param;
+ par.set("q",56);
+
+ KorAPlugin.sendMsg({
+ 'action':'redirect',
+ 'queryParam' : par.toString()
+ })
+ });
+
+ }
+
</script>
<ul>
<li><a onclick="KorAPlugin.log(333, 'Huhu!')">Send log!</a></li>
<li><a onclick="KorAPlugin.resize()">Resize</a></li>
<li><a onclick="KorAPlugin.sendMsg({'action':'pipe','service':'Glemm'})">Add Glemm</a></li>
+ <li><a onclick="redirect()">Redirect</a></li>
<li><a onclick="flood()">Flood!</a></li>
<li><a onclick="KorAPlugin.requestMsg({'action':'get', 'key':'KQ'}, function (d) { document.write(JSON.stringify(d.value))})">Get KQ</a></li>
</ul>