1234567891011121314151617181920 |
- Modernizr.addTest('websocketsbinary', function() {
- var protocol = 'https:'==location.protocol?'wss':'ws',
- protoBin;
- if('WebSocket' in window) {
- if( protoBin = 'binaryType' in WebSocket.prototype ) {
- return protoBin;
- }
- try {
- return !!(new WebSocket(protocol+'://.').binaryType);
- } catch (e){}
- }
- return false;
- });
|