summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Lamecker <bernd.lamecker@basyskom.com>2014-07-10 11:38:28 +0200
committerMilian Wolff <milian.wolff@kdab.com>2014-07-29 13:35:32 +0200
commit77a4c34bb0f3b8cc3107f9fc6be0f5f7b23bb9d6 (patch)
tree5744449e7955d19dfb07440819649bcfbe2c740f
parent37fcae09b8452f0daa252e1eb0839b1e56d8fa7c (diff)
downloadqtwebchannel-77a4c34bb0f3b8cc3107f9fc6be0f5f7b23bb9d6.tar.gz
added module.export for use with nodejs
The module.export allows qwebchannel.js being included and used from within a nodejs environment. Change-Id: I3db6ba85e8d3406031c0262815e50aca0f214ace Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
-rw-r--r--src/webchannel/qwebchannel.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/webchannel/qwebchannel.js b/src/webchannel/qwebchannel.js
index 8bfe106..dd6c4b3 100644
--- a/src/webchannel/qwebchannel.js
+++ b/src/webchannel/qwebchannel.js
@@ -415,3 +415,10 @@ function QObject(name, data, webChannel)
object[name] = data.enums[name];
}
}
+
+//required for use with nodejs
+if (typeof module === 'object') {
+ module.exports = {
+ QWebChannel: QWebChannel
+ };
+}