Skip to content

Commit

Permalink
Fix websockets test on some Panasonic SmartTV browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
philippsimon committed Feb 19, 2016
1 parent 00a4157 commit bcb5749
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion feature-detects/websockets.js
Expand Up @@ -25,5 +25,9 @@
}
!*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('websockets', 'WebSocket' in window && window.WebSocket.CLOSING === 2);
var supports = false;
try {
supports = 'WebSocket' in window && window.WebSocket.CLOSING === 2;
} catch (e) {}
Modernizr.addTest('websockets', supports);
});

0 comments on commit bcb5749

Please sign in to comment.