diff options
Diffstat (limited to 'examples/standalone/index.html')
-rw-r--r-- | examples/standalone/index.html | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/examples/standalone/index.html b/examples/standalone/index.html index 5efee77..a1aa3e4 100644 --- a/examples/standalone/index.html +++ b/examples/standalone/index.html @@ -2,34 +2,28 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <script type="text/javascript" src="../../src/webchannel/webchannel.js"></script> - <script type="text/javascript" src="../../src/webchannel/qobject.js"></script> + <script type="text/javascript" src="../../src/webchannel/qwebchannel.js"></script> <script type="text/javascript"> //BEGIN SETUP var baseUrl = (/[?&]webChannelBaseUrl=([A-Za-z0-9\-:/\.]+)/.exec(location.search)[1]); new QWebChannel(baseUrl, function(channel) { - setupQObjectWebChannel(channel, function() { - document.getElementById("send").onclick = function() { - var input = document.getElementById("input"); - var text = input.value; - if (!text) { - return; - } - var output = document.getElementById("output"); - output.innerHTML = output.innerHTML + "Send message: " + text + "\n"; - input.value = ""; - dialog.receiveText(text); + document.getElementById("send").onclick = function() { + var input = document.getElementById("input"); + var text = input.value; + if (!text) { + return; } + var output = document.getElementById("output"); + output.innerHTML = output.innerHTML + "Send message: " + text + "\n"; + input.value = ""; + dialog.receiveText(text); + } - dialog.sendText.connect(function(text) { - var output = document.getElementById("output"); - output.innerHTML = output.innerHTML + "Received message: " + text + "\n"; - }); + dialog.sendText.connect(function(text) { + var output = document.getElementById("output"); + output.innerHTML = output.innerHTML + "Received message: " + text + "\n"; }); }); - - window.onload = function() { - } //END SETUP </script> <style type="text/css"> |