Skip to content

Commit

Permalink
Editorial: Fix _includes link, add note.
Browse files Browse the repository at this point in the history
"includes" is reserved word in WebIDL, so a method with that name
needs to be escaped with a leading underscore in IDL fragments.
This confuses Bikeshed (speced/bikeshed#1489) so manually
correct the link. Also, the 2.0 version of the IDB spec had a note
which gave context for this; transplant that to the 3.0 version.

Resolves #270
  • Loading branch information
inexorabletash committed Feb 1, 2021
1 parent b0e97eb commit dd56510
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4361,6 +4361,10 @@ interface IDBKeyRange {
};
</xmp>

<aside class=note>
Note: When mapping the `_includes` identifier from [[WEBIDL]] to ECMAScript, the leading U+005F LOW LINE ("_") character is removed. A leading "_" is used to escape the identifier from looking like a reserved word (in this case, the `includes` keyword).
</aside>

<div class=note>
<dl class=domintro>
<dt><var>range</var> . {{IDBKeyRange/lower}}</dt>
Expand Down Expand Up @@ -4517,7 +4521,7 @@ The <dfn method for=IDBKeyRange>bound(|lower|, |upper|, |lowerOpen|,

<div class=algorithm>

The <dfn method for=IDBKeyRange>includes(|key|)</dfn> method, when
The <dfn method for=IDBKeyRange lt="_includes(key)|includes(key)">includes(|key|)</dfn> method, when
invoked, must run these steps:

1. Let |k| be the result of running the steps to [=convert a
Expand Down

0 comments on commit dd56510

Please sign in to comment.