[Pkg-javascript-commits] [sockjs-client] 127/350: Attach load event for transports that need the body

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:03:52 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 e91d4daf01d65eae6e11fd415456e1c93824e89d
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Mon Oct 13 11:29:17 2014 -0400

    Attach load event for transports that need the body
---
 lib/main.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/main.js b/lib/main.js
index 9d912f7..9fa727b 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -8,6 +8,7 @@ var u = require('url')
   , random = require('./utils/random')
   , escape = require('./utils/escape')
   , origin = require('./utils/origin')
+  , eventUtils = require('./utils/event')
   , SecurityError = require('./error/securityerror')
   , InvalidAccessError = require('./error/invalidaccesserror')
   , InvalidStateError = require('./error/invalidstateerror')
@@ -168,7 +169,7 @@ SockJS.prototype._connect = function() {
       if (!global.document.body ||
           (typeof global.document.readyState !== 'undefined' && global.document.readyState !== 'complete')) {
         this._transports.unshift(Transport);
-        // TODO attach to load event to call _connect
+        eventUtils.attachEvent('load', this._connect.bind(this));
         return;
       }
     }

-- 
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