mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
21 lines
662 B
JavaScript
21 lines
662 B
JavaScript
/*!
|
|
{
|
|
"name": "Battery API",
|
|
"property": "batteryapi",
|
|
"aliases": ["battery-api"],
|
|
"builderAliases": ["battery_api"],
|
|
"tags": ["device", "media"],
|
|
"authors": ["Paul Sayre", "Alex Bradley (@abrad1212)"],
|
|
"notes": [{
|
|
"name": "MDN Docs",
|
|
"href": "https://developer.mozilla.org/en/DOM/window.navigator.mozBattery"
|
|
}]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
Detect support for the Battery API, for accessing information about the system's battery charge level.
|
|
*/
|
|
define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
|
|
Modernizr.addTest('batteryapi', !!prefixed('battery', navigator) || !!prefixed('getBattery', navigator), {aliases: ['battery-api']});
|
|
});
|