blob: b0b477d15ca9d56fe6a299682d2508c2e7cea526 [file] [log] [blame]
Akron479994e2018-07-02 13:21:44 +02001<!DOCTYPE html>
2<html>
3 <head>
4 <title>Plugin demo</title>
Akrone8e2c952018-07-04 13:43:12 +02005
Akron479994e2018-07-02 13:21:44 +02006 <link type="text/css" rel="stylesheet" href="/css/kalamar.css" />
7
8 <!-- load client javascript library -->
Akrona6c32b92018-07-02 18:39:42 +02009 <script src="/js/src/plugin/client.js" data-server="http://localhost:3003/"></script>
10 <style>
11 body, html {
Akrone8e2c952018-07-04 13:43:12 +020012 padding: 0;
13 margin: 0;
14 box-sizing: border-box;
15 border-width: 0;
16 height: unset !important;
17 }
18
19 body {
20 min-height: unset !important;
Akrona6c32b92018-07-02 18:39:42 +020021 }
22 </style>
Akron479994e2018-07-02 13:21:44 +020023 </head>
Akrona6c32b92018-07-02 18:39:42 +020024 <body style="background-color: yellow">
Akron479994e2018-07-02 13:21:44 +020025 <h2>Example Widget!</h2>
Akrona99315e2018-07-03 22:56:45 +020026 <script>
27 function flood () {
28 var i = 0;
29 for (; i < 90; i++) {
30 KorAPlugin._sendMsg({
31 'action' : '-'
32 });
33 };
34 };
Akron22598cd2019-12-09 14:59:03 +010035
36 function pluginit (p) {
37 p.onMessage = function(msg) {
38 console.log("State changed to", msg.key, msg.value);
39 };
40 };
41 </script>
Akrona6c32b92018-07-02 18:39:42 +020042 <ul>
43 <li><a onclick="KorAPlugin.log(333, 'Huhu!')">Send log!</a></li>
44 <li><a onclick="KorAPlugin.resize()">Resize</a></li>
Akrona99315e2018-07-03 22:56:45 +020045 <li><a onclick="flood()">Flood!</a></li>
Akrona6c32b92018-07-02 18:39:42 +020046 </ul>
Akron8d646d72018-07-08 13:45:53 +020047 <p style="width: 2000px">------------------------------------------------------------------------------------------------------------------------</p>
Akron479994e2018-07-02 13:21:44 +020048 </body>
49</html>