<script>
'use strict';

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