frontend/.pnpm-store/v3/files/f8/dfbd5e6eaec4ec66b3d1d404dc85548aa258a1d74610cb4baa93e79a81a3b167ce08f23fad2c6954673ba22d806d9ee8b894136e62240299c457e2d55bd440

21 lines
538 B
Plaintext

// binaryType is truthy if there is support.. returns "blob" in new-ish chrome.
// plus.google.com/115535723976198353696/posts/ERN6zYozENV
// github.com/Modernizr/Modernizr/issues/370
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;
});