Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about sorting by code unit #182

Merged
merged 7 commits into from Mar 24, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions index.bs
Expand Up @@ -388,11 +388,12 @@ A <dfn>sorted name list</dfn> is a list containing [=/names=]
sorted in ascending order by 16-bit code unit.

<details class=note>
This ordering compares the 16-bit code units in each string,
producing a highly efficient, consistent, and deterministic sort
order. The resulting list will not match any particular alphabet or
lexicographical order, particularly for code points represented by a
surrogate pair.
This matches the [=Array.prototype.sort=] on an [=Array=] of
[=Strings=]. This ordering compares the 16-bit code units in each
string, producing a highly efficient, consistent, and deterministic
sort order. The resulting list will not match any particular
alphabet or lexicographical order, particularly for code points
represented by a surrogate pair.
</details>


Expand Down
11 changes: 6 additions & 5 deletions index.html
Expand Up @@ -1865,11 +1865,11 @@ <h2 class="heading settled" data-level="2" id="constructs"><span class="secno">2
can store.</p>
</aside>
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="sorted-name-list">sorted name list</dfn> is a list containing <a data-link-type="dfn" href="#name" id="ref-for-name-3">names</a> sorted in ascending order by 16-bit code unit.</p>
<details class="note"> This ordering compares the 16-bit code units in each string,
producing a highly efficient, consistent, and deterministic sort
order. The resulting list will not match any particular alphabet or
lexicographical order, particularly for code points represented by a
surrogate pair. </details>
<details class="note"> This matches the <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-array.prototype.sort">Array.prototype.sort</a> on an <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-array-objects">Array</a> of <a data-link-type="dfn" href="https://tc39.github.io/ecma262/#sec-terms-and-definitions-string-type">Strings</a>. This ordering compares the 16-bit code units in each
string, producing a highly efficient, consistent, and deterministic
sort order. The resulting list will not match any particular
alphabet or lexicographical order, particularly for code points
represented by a surrogate pair. </details>
<h3 class="heading settled" data-level="2.1" id="database-construct"><span class="secno">2.1. </span><span class="content">Database</span><a class="self-link" href="#database-construct"></a></h3>
<p>Each <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origin</a> has an associated set of <a data-link-type="dfn" href="#database" id="ref-for-database-1">databases</a>. A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="database">database</dfn> has zero or more <a data-link-type="dfn" href="#object-store" id="ref-for-object-store-1">object stores</a> which
hold the data stored in the database.</p>
Expand Down Expand Up @@ -7232,6 +7232,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<li><a href="https://tc39.github.io/ecma262/#sec-algorithm-conventions">?</a>
<li><a href="https://tc39.github.io/ecma262/#sec-completion-record-specification-type">abrupt completion</a>
<li><a href="https://tc39.github.io/ecma262/#sec-array-objects">array</a>
<li><a href="https://tc39.github.io/ecma262/#sec-array.prototype.sort">array.prototype.sort</a>
<li><a href="https://tc39.github.io/ecma262/#sec-arraybuffer-objects">arraybuffer</a>
<li><a href="https://tc39.github.io/ecma262/#sec-createdataproperty">createdataproperty</a>
<li><a href="https://tc39.github.io/ecma262/#current-realm">current realm</a>
Expand Down