Device Capabilities & Vocabulary
Device capability naming is as follows.
Common Vocabulary
The following vocabulary is supported across all device database implementation:
DDR Namepsace
| Property name | Description |
|---|---|
| cookieSupport | The ability of a client to store cookies and send them when appropriate. |
| displayColorDepth | The color depth of a display. |
| displayHeight | The total number of addressable pixels in the vertical direction of a rectangular display when held in its default orientation. |
| imageFormatSupport | Set of image formats a client supports as part of a Web page. |
| inputModeSupport | The preferred ways of supporting specific formats for input type="text" fields. |
| inputDevices | The input devices are available to the user. |
| displayWidth | The total number of addressable pixels in the horizontal direction of a rectangular display when held in its default orientation. |
| markupSupport | Set of mark-up languages a client supports. |
| model | The model name of a device, browser or some other component. |
| scriptSupport | Set of scripting languages supported. |
| stylesheetSupport | Set of Style Sheet languages a client supports. |
| vendor | The name of the maker (OEM) of a device, browser or some other component (e.g. Mozilla). |
| version | The version number of a component. |
The vocabulary in the ddr namespace is an implementation of the W3C DDR standard core vocabulary described @ http://www.w3.org/TR/ddr-core-vocabulary.
bemoko Namespace
| Property name | Description |
|---|---|
| id | id of the device (implementation specific). |
| isMobile | Is the device a mobile device? |
| isRobot | Is the device a robot? (i.e. not a human user) |
| vendorModel | Concatenation of the vendor and model |
| os | Operating System |
| preferredMarkup | Preferred markup for the device |
| preferredHtmlContentType | Preferred content type for HTML page delivery |
Device Capabilities Usage Examples
Device capabilities can be used in expressions, e.g.
<ui name="pc" expr="!device.isMobile" fallback="320" />
<ui name="iphone" expr="device.vendor=='Apple'" fallback="ajax" />
<ui name="128" expr="device.displayWidth lt 176" fallback="root" />
in UI templates, e.g.
<span>Display: ${device.displayWidth} x ${device.displayHeight}</span>
on in plugins, e.g.
if (device.isMobile) ...