diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-11 18:46:46 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-11 18:46:46 +0800 |
commit | 84b36a71939cfc6c673f0fd3fec079ca7e23df6c (patch) | |
tree | 3289a94dd8ffe0ad25dfff6d298204bb985bb07f /lib/qt.js | |
parent | dea68f073e9a071e3e3940f7a467bf3cdc8d1992 (diff) | |
download | go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.tar go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.tar.gz go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.tar.bz2 go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.tar.lz go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.tar.xz go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.tar.zst go-tangerine-84b36a71939cfc6c673f0fd3fec079ca7e23df6c.zip |
retabed files
Diffstat (limited to 'lib/qt.js')
-rw-r--r-- | lib/qt.js | 33 |
1 files changed, 17 insertions, 16 deletions
@@ -16,29 +16,30 @@ */ /** @file qt.js * @authors: + * Jeffrey Wilcke <jeff@ethdev.com> * Marek Kotewicz <marek@ethdev.com> * @date 2014 */ - var QtProvider = function() { - this.handlers = []; +var QtProvider = function() { + this.handlers = []; - var self = this; - navigator.qt.onmessage = function (message) { - self.handlers.forEach(function (handler) { - handler.call(self, JSON.parse(message.data)); - }); - }; + var self = this; + navigator.qt.onmessage = function (message) { + self.handlers.forEach(function (handler) { + handler.call(self, JSON.parse(message.data)); + }); }; +}; - QtProvider.prototype.send = function(payload) { - navigator.qt.postMessage(JSON.stringify(payload)); - }; +QtProvider.prototype.send = function(payload) { + navigator.qt.postMessage(JSON.stringify(payload)); +}; - Object.defineProperty(QtProvider.prototype, "onmessage", { - set: function(handler) { - this.handlers.push(handler); - } - }); +Object.defineProperty(QtProvider.prototype, "onmessage", { + set: function(handler) { + this.handlers.push(handler); + } +}); module.exports = QtProvider; |