web-serial-rxjs API Documentation
    Preparing search index...

    Function hasWebSerialSupport

    • Feature detection for Web Serial API.

      Checks if the browser supports the Web Serial API by verifying the presence of navigator.serial. This is a non-throwing check that returns false if the API is not available.

      Note: This function only checks for API availability, not whether the browser type is supported. For a throwing check that provides better error messages, use checkBrowserSupport.

      Returns boolean

      true if the Web Serial API is available, false otherwise

      if (hasWebSerialSupport()) {
      // Safe to use serial port functionality
      const client = createSerialClient();
      } else {
      console.error('Web Serial API is not supported');
      }