feature-policy-generic-sensor.html (255B)
1 <script> 2 "use strict"; 3 4 try { 5 const sensorName = location.hash.substring(1); 6 const sensor = new window[sensorName](); 7 window.parent.postMessage({ enabled: true }, "*"); 8 } catch (e) { 9 window.parent.postMessage({ enabled: false }, "*"); 10 } 11 </script>