From 5538ff725235f30a9afbbedc098fd18dfd9f1293 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Thu, 30 Oct 2014 22:17:50 +0100 Subject: [PATCH] Fixed Qt provider * postData => postMessage * JSON.parse parsed wrong data on 'onmessage' --- qt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt.js b/qt.js index 1b146c30dc..644c377378 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", {