Skip to content

Commit

Permalink
Recommend BufferSource for inputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
heycam committed Oct 4, 2014
1 parent 631316b commit c497edf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6168,8 +6168,14 @@ <h4>3.10.32. Buffer source types</h4>
</div>
<div class="note"><div class="noteHeader">Note</div>
<p>
It is recommended to use the <a class="idltype" href="#idl-ArrayBuffer">ArrayBuffer</a> type rather than
<a class="idltype" href="#idl-Uint8Array">Uint8Array</a> to return a buffer of data from an API.
When designing APIs that take a buffer, it is recommended to use the
<span class="idltype">BufferSource</span> typedef rather than <a class="idltype" href="#idl-ArrayBuffer">ArrayBuffer</a>
or any of the view types.
</p>
<p>
When designing APIs that create and return a buffer, it is recommended
to use the <a class="idltype" href="#idl-ArrayBuffer">ArrayBuffer</a> type rather than
<a class="idltype" href="#idl-Uint8Array">Uint8Array</a>.
</p>
</div>
<p>
Expand Down
10 changes: 8 additions & 2 deletions index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6065,8 +6065,14 @@ interface Person {
</div>
<div class='note'>
<p>
It is recommended to use the <span class='idltype'>ArrayBuffer</span> type rather than
<span class='idltype'>Uint8Array</span> to return a buffer of data from an API.
When designing APIs that take a buffer, it is recommended to use the
<span class='idltype'>BufferSource</span> typedef rather than <span class='idltype'>ArrayBuffer</span>
or any of the view types.
</p>
<p>
When designing APIs that create and return a buffer, it is recommended
to use the <span class='idltype'>ArrayBuffer</span> type rather than
<span class='idltype'>Uint8Array</span>.
</p>
</div>
<p>
Expand Down

0 comments on commit c497edf

Please sign in to comment.