Automattic/engine.io-client — pull request #314 by rase- (2014-06-22 22:37:45+00:00)
Title: Possibility to disable JSONP.

A first pass at being able to disable JSONP polling. Totally up for discussion.

Enables disabling by an option `noJSONP` that can be set to `true` (`false` by default). If set to true and trying to open a polling connection, we move immediately to a possible next transport. If there is not transport left to open with, we emit an error that no transports are available.

We could make our polling transports also not autodetectable as `xhr` and `json` so that we could specify transport literals like: `['xhr', 'websocket']` to specify we don't want JSONP polling as an option. This would, however, complicate the handling of transports and upgrades and I'm not sure if it's worth it for this one edge case.

Thoughts on this @guille?