source: trip-planner-front/node_modules/sockjs-client/lib/utils/browser.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 560 bytes
RevLine 
[6a3a178]1'use strict';
2
3module.exports = {
4 isOpera: function() {
5 return global.navigator &&
6 /opera/i.test(global.navigator.userAgent);
7 }
8
9, isKonqueror: function() {
10 return global.navigator &&
11 /konqueror/i.test(global.navigator.userAgent);
12 }
13
14 // #187 wrap document.domain in try/catch because of WP8 from file:///
15, hasDomain: function () {
16 // non-browser client always has a domain
17 if (!global.document) {
18 return true;
19 }
20
21 try {
22 return !!global.document.domain;
23 } catch (e) {
24 return false;
25 }
26 }
27};
Note: See TracBrowser for help on using the repository browser.