From 24c30177de1de3bad9c6e14bda6fc74db8defa78 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 3 Sep 2011 10:57:49 -0700 Subject: [PATCH] Fixed; make Socket.IO XHTML doctype compatible (fixes #460 from server) --- lib/socket.js | 2 +- lib/transports/jsonp-polling.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/socket.js b/lib/socket.js index c20759f14..f2d3488f4 100644 --- a/lib/socket.js +++ b/lib/socket.js @@ -136,7 +136,7 @@ if (this.isXDomain()) { var insertAt = document.getElementsByTagName('script')[0] - , script = document.createElement('SCRIPT'); + , script = document.createElement('script'); script.src = url + '&jsonp=' + io.j.length; insertAt.parentNode.insertBefore(script, insertAt); diff --git a/lib/transports/jsonp-polling.js b/lib/transports/jsonp-polling.js index 573d79613..c69643bdd 100644 --- a/lib/transports/jsonp-polling.js +++ b/lib/transports/jsonp-polling.js @@ -68,8 +68,8 @@ ); if (!this.form) { - var form = document.createElement('FORM') - , area = document.createElement('TEXTAREA') + var form = document.createElement('form') + , area = document.createElement('textarea') , id = this.iframeId = 'socketio_iframe_' + this.index , iframe; @@ -144,7 +144,7 @@ JSONPPolling.prototype.get = function () { var self = this - , script = document.createElement('SCRIPT') + , script = document.createElement('script') , query = io.util.query( this.socket.options.query , 't='+ (+new Date) + '&i=' + this.index