UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

30 lines (29 loc) 789 B
/*! { "name": "WebSockets Support", "property": "websockets", "authors": ["Phread [fearphage]", "Mike Sherov [mikesherov]", "Burak Yigit Kaya [BYK]"], "caniuse": "websockets", "tags": ["html5"], "warnings": [ "This test will reject any old version of WebSockets even if it is not prefixed such as in Safari 5.1" ], "notes": [{ "name": "CLOSING State and Spec", "href": "http://www.w3.org/TR/websockets/#the-websocket-interface" }], "polyfills": [ "sockjs", "socketio", "kaazing-websocket-gateway", "websocketjs", "atmosphere", "graceful-websocket", "portal", "datachannel" ] } !*/ define(['Modernizr'], function( Modernizr ) { Modernizr.addTest('websockets', 'WebSocket' in window && window.WebSocket.CLOSING === 2); });