Skip to content

Fixed JSONP-Polling's this._insertAt.parentNode.insertBefore() call (collision with jQuery!)#82

Closed
saschagehlich wants to merge 1 commit intosocketio:masterfrom
saschagehlich:master
Closed

Fixed JSONP-Polling's this._insertAt.parentNode.insertBefore() call (collision with jQuery!)#82
saschagehlich wants to merge 1 commit intosocketio:masterfrom
saschagehlich:master

Conversation

@saschagehlich
Copy link

I found out that there can be collisions with jQuery's way of fetching data through JSONP: jQuery appends the "head" tag OR appends document.documentElement. In case of appending the documentElement (e.g. the html tag) socket.io tries to get the parentNode of the html-tag which is undefined, so .insertBefore() does not work anymore.

I fixed that so socket.io uses the "head" tag to include JSONP scripts.

@rauchg
Copy link
Contributor

rauchg commented Mar 6, 2011

Fixed

@jamesarosen
Copy link

@guille can you point to where you fixed this? As of the current master branch, _insertAt is still a <script> tag, not a <head> tag: https://github.com/LearnBoost/Socket.IO/blob/master/socket.io.js. Did you find another workaround?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants