From 2a496f7783474477e84b45aa981c10a1ff5093ec Mon Sep 17 00:00:00 2001 From: Reilly Grant Date: Fri, 27 Feb 2026 11:29:27 -0800 Subject: [PATCH] Reject if baudRate is zero The documentation of the baudRate member of SerialOptions says that it must be a non-zero value but this was not checked by the method steps for open(). --- index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9ea5185..e8801f5 100644 --- a/index.html +++ b/index.html @@ -708,14 +708,16 @@

|promise| with an "{{InvalidStateError}}" {{DOMException}} and return |promise|. +
  • If |options|["{{SerialOptions/baudRate}}"] is 0, reject |promise| + with a {{TypeError}} and return |promise|.
  • If |options|["{{SerialOptions/dataBits}}"] is not 7 or 8, reject - |promise| with {{TypeError}} and return |promise|. + |promise| with a {{TypeError}} and return |promise|.
  • If |options|["{{SerialOptions/stopBits}}"] is not 1 or 2, reject - |promise| with {{TypeError}} and return |promise|. + |promise| with a {{TypeError}} and return |promise|.
  • If |options|["{{SerialOptions/bufferSize}}"] is 0, reject - |promise| with {{TypeError}} and return |promise|. + |promise| with a {{TypeError}} and return |promise|.
  • Optionally, if |options|["{{SerialOptions/bufferSize}}"] is larger than the implementation is able to support, reject |promise| @@ -1416,7 +1418,7 @@

    |promise|.

  • If all of the specified members of |signals| are not present - reject |promise| with {{TypeError}} and return |promise|. + reject |promise| with a {{TypeError}} and return |promise|.
  • Perform the following steps [=in parallel=]: