diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/webchannel.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webchannel.js b/src/webchannel.js index a8496d8..6141268 100644 --- a/src/webchannel.js +++ b/src/webchannel.js @@ -105,6 +105,11 @@ var QWebChannel = function(baseUrl, initCallback) this.execId = 0; this.exec = function(data, callback) { + if (!callback) { + // if no callback is given, send directly + channel.send({data: data}); + return; + } if (channel.execId === Number.MAX_VALUE) { // wrap channel.execId = Number.MIN_VALUE; |