GetDeviceInfo method: Request class
Syntax
GetDeviceInfo(attribute)
Description
Use the GetDeviceInfo method to detect and return a value for the specified device attribute.
Important:
Use this method within fluid applications only.
Parameters
| Parameter | Description |
|---|---|
|
attribute |
Specifies one of the listed device attributes as a string value: |
| Attribute | Returns |
|---|---|
|
width |
The device's width in physical pixels. |
|
height |
The device's height in physical pixels. |
|
pixelratio |
The ratio between physical pixels and device-independent pixels (dips) on the device. |
|
touch |
Whether the device supports touch events:
|
|
geolocation |
Whether the device supports the geolocation API:
|
|
websockets |
Whether the device supports the WebSockets API:
|
|
webworkers |
Whether the device supports the Web Workers API:
|
|
datepicker |
Whether the device supports the DatePicker widget:
|
|
dtpicker |
Whether the device supports the DateTimePicker widget:
|
|
timepicker |
Whether the device supports the TimePicker widget:
|
|
dnd |
Whether the device natively supports drag-and-drop:
|
|
sessionstorage |
Whether the device supports the sessionStorage object:
|
|
localstorage |
Whether the device supports the localStorage object:
|
|
history |
Whether the device supports the history API:
|
|
canvas |
Whether the device supports the <canvas> element:
|
|
svg |
Whether the device supports the Scalable Vector Graphics (SVG) format:
|
|
postmessage |
Whether the device supports the method:
|
|
hc |
Whether the device supports a high contrast mode:
|
Returns
An Integer value.
Example
&dev_info = %Request.GetDeviceInfo("width");