Revision control
<html>
<head>
<script src="../../src/qwebchannel.js"></script>
<script>
- function load() {
- navigator.webChannel.subscribe("incoming-call",
- function(message) { debug(message); }
+ window.onload = function() {
+ var textArea = document.querySelector("textarea");
+ function debug(x) {
+ textArea.value = textArea.value + x + "\n";
+ }
+
+ navigator.webChannel.subscribe(
+ "incoming-call",
+ function(message) {
+ debug(message);
+ }
);
- navigator.webChannel.exec({a:"This is a request from HTML"}, function(response) {
- debug(response.b);
- });
- }
+ navigator.webChannel.execute(
+ {a:"This is a request from HTML"},
+ function(response) {
+ debug(response.b);
+ }
+ );
+ };
</script>
</head>
- <body onload="load()">
- <div>444</div>
+ <body>
+ <textarea style="width: 100%; height: 100%"></textarea>
</body>
</html>