You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/device/Browser.js
+30-53Lines changed: 30 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -1,69 +1,54 @@
1
1
varOS=require('./OS');
2
2
3
+
/**
4
+
* Determines the browser type and version running this Phaser Game instance.
5
+
* These values are read-only and populated during the boot sequence of the game.
6
+
* They are then referenced by internal game systems and are available for you to access
7
+
* via `this.sys.game.device.browser` from within any Scene.
8
+
*
9
+
* @namespace Phaser.Device.Browser
10
+
* @typedef {object} DeviceBrowser
11
+
* @since 3.0.0
12
+
*
13
+
* @property {boolean} chrome - Set to true if running in Chrome.
14
+
* @property {boolean} edge - Set to true if running in Microsoft Edge browser.
15
+
* @property {boolean} firefox - Set to true if running in Firefox.
16
+
* @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).
17
+
* @property {boolean} mobileSafari - Set to true if running in Mobile Safari.
18
+
* @property {boolean} opera - Set to true if running in Opera.
19
+
* @property {boolean} safari - Set to true if running in Safari.
20
+
* @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)
21
+
* @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)
22
+
* @property {number} chromeVersion - If running in Chrome this will contain the major version number.
23
+
* @property {number} firefoxVersion - If running in Firefox this will contain the major version number.
24
+
* @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.
25
+
* @property {number} safariVersion - If running in Safari this will contain the major version number.
26
+
* @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}
27
+
*/
3
28
varBrowser={
4
29
5
-
// @property {boolean} arora - Set to true if running in Arora.
6
-
arora: false,
7
-
8
-
// @property {boolean} chrome - Set to true if running in Chrome.
9
30
chrome: false,
10
-
11
-
// @property {number} chromeVersion - If running in Chrome this will contain the major version number.
12
31
chromeVersion: 0,
13
-
14
-
// @property {boolean} epiphany - Set to true if running in Epiphany.
15
-
epiphany: false,
16
-
17
-
// @property {boolean} firefox - Set to true if running in Firefox.
32
+
edge: false,
18
33
firefox: false,
19
-
20
-
// @property {number} firefoxVersion - If running in Firefox this will contain the major version number.
21
34
firefoxVersion: 0,
22
-
23
-
// @property {boolean} mobileSafari - Set to true if running in Mobile Safari.
24
-
mobileSafari: false,
25
-
26
-
// @property {boolean} ie - Set to true if running in Internet Explorer.
27
35
ie: false,
28
-
29
-
// @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion.
30
36
ieVersion: 0,
31
-
32
-
// @property {boolean} midori - Set to true if running in Midori.
33
-
midori: false,
34
-
35
-
// @property {boolean} opera - Set to true if running in Opera.
37
+
mobileSafari: false,
36
38
opera: false,
37
-
38
-
// @property {boolean} safari - Set to true if running in Safari.
39
39
safari: false,
40
-
41
-
// @property {number} safariVersion - If running in Safari this will contain the major version number.
42
40
safariVersion: 0,
43
-
44
-
// @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)
41
+
silk: false,
45
42
trident: false,
46
-
47
-
// @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}
48
-
tridentVersion: 0,
49
-
50
-
// @property {boolean} edge - Set to true if running in Microsoft Edge browser.
51
-
edge: false,
52
-
53
-
// @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)
0 commit comments