<script>
'use strict';

navigator.serial.getPorts().then(ports => {
  window.parent.postMessage({ enabled: true }, '*');
}, error => {
  window.parent.postMessage({ enabled: false }, '*');
});
</script>
