window.addEventListener('deviceproximity', function(event) {
console.log("value: " + event.value, "max: " + event.max, "min: " + event.min);
});
The *deviceproximity* event returns an object with the following properties: max, min and value (the actual value measured by the proximity sensor). All properties are measured in centimeters.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.