aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <obscuren@users.noreply.github.com>2014-10-31 05:17:50 +0800
committerJeffrey Wilcke <obscuren@users.noreply.github.com>2014-10-31 05:17:50 +0800
commit5538ff725235f30a9afbbedc098fd18dfd9f1293 (patch)
tree48636f670d0c2eedf3e186fa8f9fbbf296a7ae24
parentaca9a41fcf38ae42ab72b663b6fdc4ecd9c7a7b9 (diff)
downloaddexon-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.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt.js b/qt.js
index 1b146c30d..644c37737 100644
--- a/qt.js
+++ b/qt.js
@@ -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", {