Skip to content

Commit

Permalink
Check for the Write properties when calling writeValue on characteris…
Browse files Browse the repository at this point in the history
…tic (#248)
  • Loading branch information
zakorgy authored and jyasskin committed Jul 21, 2016
1 parent 7614206 commit e7d905b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3038,6 +3038,11 @@ spec: permissions
<a>a new promise</a> <var>promise</var>
and run the following steps in parallel.
<ol>
<li>
If none of the <code>Write</code>, <code>Write Without Response</code> or <code>Authenticated Signed Writes</code> bits are set
in <var>characteristic</var>'s <a lt="Characteristic Properties">properties</a>,
<a>reject</a> <var>promise</var> with a {{NotSupportedError}} and abort these steps.
</li>
<li>
Use any combination of the sub-procedures in
the <a>Characteristic Value Write</a> procedure
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3277,6 +3277,7 @@ <h3 class="heading settled dfn-paneled idl-code" data-dfn-type="interface" data-
<li>
Return a <code>this.service.device.gatt</code>-<a data-link-type="dfn" href="#connection-checking-wrapper" id="ref-for-connection-checking-wrapper-3">connection-checking wrapper</a> around <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise">a new promise</a> <var>promise</var> and run the following steps in parallel.
<ol>
<li> If none of the <code>Write</code>, <code>Write Without Response</code> or <code>Authenticated Signed Writes</code> bits are set in <var>characteristic</var>’s <a data-link-type="dfn" href="#characteristic-properties" id="ref-for-characteristic-properties-2">properties</a>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notsupportederror">NotSupportedError</a></code> and abort these steps.
<li> Use any combination of the sub-procedures in
the <a data-link-type="dfn" href="#characteristic-value-write" id="ref-for-characteristic-value-write-1">Characteristic Value Write</a> procedure
to write <var>bytes</var> to <var>characteristic</var>.
Expand Down

0 comments on commit e7d905b

Please sign in to comment.