WebSession.Browser
From Xojo Documentation
Read-Only Property (As WebSession.BrowserType )
This property is only available for Web applications. |
WebSession.BrowserTypeValue = aWebSession.Browser
New in 2010r4
Supported for all project types and targets.
New in 2010r4
Supported for all project types and targets.
Specifies the browser being used for this session. See the list of Enumerations for the WebSession class.
Example
This code in a WebPage.Shown event handler displays the type of browser being used to connect to the session:
Select Case Session.Browser
Case WebSession.BrowserType.Android
MsgBox("Android")
Case WebSession.BrowserType.Blackberry
MsgBox("Blackberry")
Case WebSession.BrowserType.Chrome
MsgBox("Chrome")
Case WebSession.BrowserType.ChromeOS
MsgBox("ChromeOS")
Case WebSession.BrowserType.Firefox
MsgBox("Firefox")
Case WebSession.BrowserType.InternetExplorer
MsgBox("Internet Explorer")
Case WebSession.BrowserType.Opera
MsgBox("Opera")
Case WebSession.BrowserType.OperaMini
MsgBox("Opera Mini")
Case WebSession.BrowserType.Safari
MsgBox("Safari")
Case WebSession.BrowserType.SafariMobile
MsgBox("Safari Mobile")
Case WebSession.BrowserType.Epiphany
MsgBox("Epiphany on Raspberry Pi")
Case WebSession.BrowserType.Unknown
MsgBox("Unknown web browser")
End Select
Case WebSession.BrowserType.Android
MsgBox("Android")
Case WebSession.BrowserType.Blackberry
MsgBox("Blackberry")
Case WebSession.BrowserType.Chrome
MsgBox("Chrome")
Case WebSession.BrowserType.ChromeOS
MsgBox("ChromeOS")
Case WebSession.BrowserType.Firefox
MsgBox("Firefox")
Case WebSession.BrowserType.InternetExplorer
MsgBox("Internet Explorer")
Case WebSession.BrowserType.Opera
MsgBox("Opera")
Case WebSession.BrowserType.OperaMini
MsgBox("Opera Mini")
Case WebSession.BrowserType.Safari
MsgBox("Safari")
Case WebSession.BrowserType.SafariMobile
MsgBox("Safari Mobile")
Case WebSession.BrowserType.Epiphany
MsgBox("Epiphany on Raspberry Pi")
Case WebSession.BrowserType.Unknown
MsgBox("Unknown web browser")
End Select