@@ -6356,7 +6356,11 @@ To <dfn>trigger a simulated characteristic event </dfn> given a [=navigable=] |n
63566356 1. Set |params|[`"serviceUuid"`] to |service|'s <a>UUID</a> .
63576357 1. Set |params|[`"characteristicUuid"`] to |characteristic|'s <a>UUID</a> .
63586358 1. Set |params|[`"type"`] to |type|.
6359- 1. If |type| is `write`, set |params|[`"data"`] to a [=new=] {{Uint8Array}} wrapping a [=new=] {{ArrayBuffer}} containing |bytes|.
6359+ 1. If |type| is `write`, run the following steps:
6360+ 1. Let |data| be an empty list.
6361+ 1. For each |byte| in |bytes|:
6362+ 1. Append |byte|'s [=byte/value=] to |data|.
6363+ 1. Set |params|[`"data"`] to |data|.
636063641. Let |body| be a [=map=] matching the <code> bluetooth.CharacteristicEventGenerated</code> production, with the
63616365 <code> params</code> field set to |params|.
636263661. Let |relatedNavigables| be a [=/set=] containing |navigable|.
@@ -6401,7 +6405,11 @@ To <dfn>trigger a simulated descriptor event </dfn> given a [=navigable=] |navig
64016405 1. Set |params|[`"characteristicUuid"`] to |characteristic|'s <a>UUID</a> .
64026406 1. Set |params|[`"descriptorUuid"`] to |descriptor|'s <a>UUID</a> .
64036407 1. Set |params|[`"type"`] to |type|.
6404- 1. If |type| is `write`, set |params|[`"data"`] to a [=new=] {{Uint8Array}} wrapping a [=new=] {{ArrayBuffer}} containing |bytes|.
6408+ 1. If |type| is `write`, run the following steps:
6409+ 1. Let |data| be an empty list.
6410+ 1. For each |byte| in |bytes|:
6411+ 1. Append |byte|'s [=byte/value=] to |data|.
6412+ 1. Set |params|[`"data"`] to |data|.
640564131. Let |body| be a [=map=] matching the <code> bluetooth.DescriptorEventGenerated</code> production, with the
64066414 <code> params</code> field set to |params|.
640764151. Let |relatedNavigables| be a [=/set=] containing |navigable|.
0 commit comments