Context
Summary
Information about the context of the application (ej: device's viewport)
Properties
_androidversion
Syntax
_androidversion
Object
private
Summary
Android version info
browser
Syntax
browser
String
Summary
Browser info
Example:
if (m.context.browser === "firefox") {
console.log("Your browser is Firefox.");
}
cordova
Syntax
cordova
Object
Summary
Apache Cordova info
Example:
if (m.context.cordova) {
console.log("Your app is running on Cordova");
}
os
Syntax
os
Function
Summary
System info
Example:
if (m.context.os === "android") {
console.log("Your device use Android.");
}
phonegap
Syntax
phonegap
Object
Summary
PhoneGap info
Example:
if (m.context.cordova) {
console.log("Your app is running on PhoneGap");
}
viewport
Syntax
viewport
Object
Summary
Viewport info
Example:
img.width = m.context.viewport.width
img.height = m.context.viewport.height