Skip to content

Commit 3a5f734

Browse files
committed
Concerning #49: specified timeout related behavior in more detail.
1 parent 57d0487 commit 3a5f734

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

index.html

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,8 @@
13831383
The <dfn>NFCPushOptions.timeout</dfn> property
13841384
denotes the timeout for the pending <code>pushMessage()</code>
13851385
operation expressed in milliseconds. The default value is
1386-
implementation-dependent. After the <var>timeout</var> expires, the
1386+
implementation-dependent. The value <code>Infinity</code> means there is
1387+
no timeout. After the <var>timeout</var> expires, the
13871388
message set for sending is cleared, an error is returned, and a new
13881389
<a>Web NFC message</a> can be set for sending.
13891390
</p>
@@ -1394,7 +1395,7 @@
13941395
This section describes how to write an <a>NDEF message</a>
13951396
to an <a>NFC tag</a> or how to push it to an <a>NFC peer</a>
13961397
device next time when they get into proximity range, or until
1397-
a timeout expires. At any time for there is at maximum two
1398+
a timeout expires. At any time there is at maximum two
13981399
<a>Web NFC message</a>s that can be set for sending for an <a>origin</a>:
13991400
one targeted to <a>NFC tag</a>s and one to <a>NFC peer</a>s.
14001401
When there is a <a>Web NFC message</a> set for sending
@@ -1470,7 +1471,9 @@
14701471
<li>
14711472
If the <var>options</var> parameter is undefined, then
14721473
let <var>options</var> be a new <code><a>NFCPushOptions</a></code>
1473-
object with the default values.
1474+
object with the default values. If any of the
1475+
<code><a>NFCPushOptions</a></code> properties are undefined, use
1476+
the default values.
14741477
</li>
14751478
Otherwise, if the <var>options</var> parameter is defined and it is
14761479
not a valid instance of <code><a>NFCPushOptions</a></code>, then
@@ -1480,7 +1483,8 @@
14801483
<li>
14811484
Let <var>output</var> be the notation for the <a>NDEF message</a>
14821485
to be created by an API call to the underlying platform, based on
1483-
data provided by these steps.
1486+
data provided by these steps. On any termination of this algorithm,
1487+
<var>output</var> MUST be cleared.
14841488
</li>
14851489
<li>
14861490
For each <a>NFCRecord</a> <var>record</var> in the sequence
@@ -1576,12 +1580,19 @@
15761580
Add <var>web ndef</var> to <var>output</var>.
15771581
</li>
15781582
<li>
1579-
Let <var>timer</var> be a new timer associated with this invocation
1580-
of <code>pushMessage()</code>.
1583+
If <var>options</var>.timeout value is not valid or not supported
1584+
in the underlying platform, reject <var>promise</var> with
1585+
<code>"SyntaxError"</code>, and abort these steps.
1586+
<li>
1587+
If <var>options</var>.timeout value is not <code>Infinity</code>,
1588+
let <var>timer</var> be a new timer associated with this invocation
1589+
of <code>pushMessage()</code>, set to <var>options</var>.timeout,
1590+
and start <var>timer</var>. On any termination of this algorithm,
1591+
<var>timer</var> MUST be cleared.
15811592
</li>
15821593
<li>
1583-
If <var>timer</var> expires, reject <var>promise</var> with
1584-
<code>"TimeoutError"</code> and abort these steps.
1594+
If <var>timer</var> exists and expires, reject <var>promise</var>
1595+
with <code>"TimeoutError"</code> and abort these steps.
15851596
</li>
15861597
<li>
15871598
When an <a>NFC device</a> comes within communication range,

0 commit comments

Comments
 (0)