UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

22 lines (19 loc) 572 B
/*! { "name": "Battery API", "property": "batteryapi", "aliases": ["battery-api"], "tags": ["device", "media"], "authors": ["Paul Sayre"], "notes": [{ "name": "MDN documentation", "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), { aliases: ['battery-api'] }); });