diff options
author | Jeffrey Wilcke <obscuren@users.noreply.github.com> | 2014-10-31 05:17:50 +0800 |
---|---|---|
committer | Jeffrey Wilcke <obscuren@users.noreply.github.com> | 2014-10-31 05:17:50 +0800 |
commit | 5538ff725235f30a9afbbedc098fd18dfd9f1293 (patch) | |
tree | 48636f670d0c2eedf3e186fa8f9fbbf296a7ae24 | |
parent | aca9a41fcf38ae42ab72b663b6fdc4ecd9c7a7b9 (diff) | |
download | dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.tar dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.tar.gz dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.tar.bz2 dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.tar.lz dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.tar.xz dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.tar.zst dexon-5538ff725235f30a9afbbedc098fd18dfd9f1293.zip |
Fixed Qt provider
* postData => postMessage
* JSON.parse parsed wrong data on 'onmessage'
-rw-r--r-- | qt.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5,13 +5,13 @@ var self = this; navigator.qt.onmessage = function (message) { self.handlers.forEach(function (handler) { - handler.call(self, JSON.parse(message)); + handler.call(self, JSON.parse(message.data)); }); } }; QtProvider.prototype.send = function(payload) { - navigator.qt.postData(JSON.stringify(payload)); + navigator.qt.postMessage(JSON.stringify(payload)); }; Object.defineProperty(QtProvider.prototype, "onmessage", { |