diff options
Diffstat (limited to 'examples/qmlapp/index.html')
-rw-r--r-- | examples/qmlapp/index.html | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/examples/qmlapp/index.html b/examples/qmlapp/index.html deleted file mode 100644 index b3b8bb1..0000000 --- a/examples/qmlapp/index.html +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <script type="text/javascript" src="qrc:///qwebchannel/qwebchannel.js"></script> - <script type="text/javascript"> - function output(x) - { - document.querySelector("#out").innerHTML += x + "<br/>"; - } - window.onload = function() { - var baseUrl = (/[?&]webChannelBaseUrl=([A-Za-z0-9\-:/\.]+)/.exec(location.search)[1]); - new QWebChannel(baseUrl, function(c) { - c.subscribe( - "foobar", - function(message) { - output(message); - } - ); - window.send = function() { - c.exec( - {a:"This is a request from HTML"}, - function(response) { - output(response.b); - } - ); - }; - window.send(); - }, true); - }; - </script> - </head> - <body> - <a href="javascript:send()">Go</a> - <div id="out"></div> - </body> -</html> |