Source code
Revision control
Copy as Markdown
Other Tools
<script>
'use strict';
Promise.resolve().then(() => navigator.getBattery()).then(battery => {
window.parent.postMessage({ type: 'availability-result', enabled: true }, '*');
}, error => {
window.parent.postMessage({ type: 'availability-result', enabled: false }, '*');
});
</script>