Skip to content

Commit

Permalink
Fix #488: inconsistency in handling Id and MediaType slots
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
  • Loading branch information
zolkis committed Dec 27, 2019
1 parent 5a3d580 commit 66ea476
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.html
Expand Up @@ -2044,7 +2044,7 @@ <h2>The <dfn>record type</dfn> string</h2>
<tbody data-link-for="NDEFScanOptions">
<tr>
<td><dfn>[[\Id]]</dfn></td>
<td>An empty <a>string</a>.</td>
<td>`undefined`</td>
<td>
The {{NDEFScanOptions}}.<a>id</a> value.
</td>
Expand All @@ -2058,7 +2058,7 @@ <h2>The <dfn>record type</dfn> string</h2>
</tr>
<tr>
<td><dfn>[[\MediaType]]</dfn></td>
<td>An empty <a>string</a>.</td>
<td>`undefined`</td>
<td>
The {{NDEFScanOptions}}.<a>mediaType</a> value.
</td>
Expand Down Expand Up @@ -3563,7 +3563,7 @@ <h3><dfn>Writing or pushing content</dfn></h3>
Let |matched:boolean| be `false`.
</li>
<li>
If |reader|.<a>[[\Id]]</a> is not empty string and is equal to
If |reader|.<a>[[\Id]]</a> is not `undefined` and is equal to

This comment has been minimized.

Copy link
@leonhsl

leonhsl Dec 30, 2019

Contributor

is equal ==> is not equal

This comment has been minimized.

Copy link
@zolkis

zolkis Dec 30, 2019

Author Contributor

thanks!
(BTW please comment in PR, not in commit, if possible: easier to find)

|record|'s <a href="#dom-ndefrecord-id">id</a>,
[= iteration/continue =].
If it is equal, set |matched| to `true`.

This comment has been minimized.

Copy link
@leonhsl

leonhsl Dec 30, 2019

Contributor

Why not set |matched| to true for the case of undefined id?

This comment has been minimized.

Copy link
@zolkis

zolkis Dec 30, 2019

Author Contributor

Because then it will depend on the other fields. It's not automatically true.

Expand All @@ -3576,7 +3576,7 @@ <h3><dfn>Writing or pushing content</dfn></h3>
If it is equal, set |matched| to `true`.
</li>
<li>
If |reader|.<a>[[\MediaType]]</a> is not empty string and is not

This comment has been minimized.

Copy link
@leonhsl

leonhsl Dec 30, 2019

Contributor

If we use "not undefined" phrase for Id and MediaType, then we better use it for RecordType as well.

This comment has been minimized.

Copy link
@zolkis

zolkis Dec 30, 2019

Author Contributor

For the internal slot [[RecordType]] we do use undefined.

This comment has been minimized.

Copy link
@zolkis

zolkis Dec 30, 2019

Author Contributor

Ah, you mean in the text. Yes, I think using "not undefined" is better for internal slots than using "is present".

If |reader|.<a>[[\MediaType]]</a> is not `undefined` and is not

This comment has been minimized.

Copy link
@leonhsl

leonhsl Dec 30, 2019

Contributor

Please update all relevant descriptions in https://w3c.github.io/web-nfc/#the-ndefscanoptions-dictionary as well.

This comment has been minimized.

Copy link
@zolkis

zolkis Dec 30, 2019

Author Contributor

Makes sense.

equal to
|record|'s <a href="#dom-ndefrecord-mediatype">mediaType</a>,
[= iteration/continue =].
Expand Down

0 comments on commit 66ea476

Please sign in to comment.