This repository has been archived by the owner on Sep 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
API: CSS: Body Telemetry
Trott edited this page Mar 8, 2012
·
3 revisions
The MWF Javascript Handler writes a set of classes into the body tag of each page in which it is present. These classes offer information about the visiting device that a content provider can use to write targeted CSS and Javascript.
To offer telemetry describing the device capabilities determined by the MWF available to front-end code so that content providers can have a greater level of control and specificity when writing CSS/JS.
The following classes are written into the page by js.php.
- .mwf - If the MWF was able to write classes into the body tag at all.
- .mwf_mobile - If device is regarded as mobile.
- .mwf_notmobile - If device is regarded as non-mobile.
- .mwf_standard - If device falls under the "standard" classification.
- .mwf_full - If device falls under the "full" classification.
- .mwf_browser_{name} - Browser name.
- .mwf_browser_{name}_{version} - Browser name and version.
-
.mwf_os_{name} - Operating system. One of:
- mwf_os_iphone_os
- mwf_os_android
- mwf_os_blackberry
- mwf_os_windows_phone_os
- mwf_os_symbian
- mwf_os_webos
- mwf_os_mac_os_x
- mwf_os_windows_nt
- mwf_os_linux
- .mwf_os_{name}_{version} - Device OS name and version.