[Pkg-javascript-commits] [sockjs-client] 286/350: Fix #215 add warning if using protocols_whitelist
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit 807a5c447c7f3c485cfc9a8f92c06465f5b33571
Author: Bryce Kahle <bkahle at gmail.com>
Date: Sun Feb 1 12:15:07 2015 -0500
Fix #215 add warning if using protocols_whitelist
---
lib/main.js | 4 ++++
lib/utils/log.js | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git a/lib/main.js b/lib/main.js
index e02dc2b..4cbae08 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -12,6 +12,7 @@ var URL = require('url-parse')
, transport = require('./utils/transport')
, objectUtils = require('./utils/object')
, browser = require('./utils/browser')
+ , log = require('./utils/log')
, Event = require('./event/event')
, EventTarget = require('./event/eventtarget')
, loc = require('./location')
@@ -45,6 +46,9 @@ function SockJS(url, protocols, options) {
// non-standard extension
options = options || {};
+ if (options.protocols_whitelist) {
+ log.info("Warning: 'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
+ }
this._transportsWhitelist = options.transports;
this._server = options.server || random.numberString(1000);
diff --git a/lib/utils/log.js b/lib/utils/log.js
new file mode 100644
index 0000000..976db73
--- /dev/null
+++ b/lib/utils/log.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = {
+ info: function() {
+ if (global.console && global.console.log && global.console.apply) {
+ global.console.log.apply(global.console, arguments);
+ }
+ }
+};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list