Phaser API Documentation

  Version: 
Browser

Description:

Determines the browser type and version running this Phaser Game instance. These values are read-only and populated during the boot sequence of the game. They are then referenced by internal game systems and are available for you to access via this.sys.game.device.browser from within any Scene.

Properties:
name type description
chrome boolean

Set to true if running in Chrome.

edge boolean

Set to true if running in Microsoft Edge browser.

firefox boolean

Set to true if running in Firefox.

ie boolean

Set to true if running in Internet Explorer 11 or less (not Edge).

mobileSafari boolean

Set to true if running in Mobile Safari.

opera boolean

Set to true if running in Opera.

safari boolean

Set to true if running in Safari.

silk boolean

Set to true if running in the Silk browser (as used on the Amazon Kindle)

trident boolean

Set to true if running a Trident version of Internet Explorer (IE11+)

chromeVersion number

If running in Chrome this will contain the major version number.

firefoxVersion number

If running in Firefox this will contain the major version number.

ieVersion number

If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.

safariVersion number

If running in Safari this will contain the major version number.

tridentVersion number

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}

Type:
object
Since: 3.0.0
Source: src/device/Browser.js (Line 9)