@@ -2079,11 +2079,10 @@ <h2>The <dfn>record type</dfn> string</h2>
2079
2079
</ td >
2080
2080
</ tr >
2081
2081
< tr >
2082
- < td > < dfn > [[\PendingRead ]]</ dfn > </ td >
2082
+ < td > < dfn > [[\ActivatedReaderList ]]</ dfn > </ td >
2083
2083
< td > empty < a > set</ a > </ td >
2084
2084
< td >
2085
- A <|promise:Promise|, |reader:NDEFReader|> tuple where |promise|
2086
- holds a {{Promise}} and |reader| holds an {{NDEFReader}}.
2085
+ A < a > set</ a > of {{NDEFReader}} instances.
2087
2086
</ td >
2088
2087
</ tr >
2089
2088
< tr >
@@ -2097,8 +2096,8 @@ <h2>The <dfn>record type</dfn> string</h2>
2097
2096
</ tbody >
2098
2097
</ table >
2099
2098
< p >
2100
- The < dfn > pending read tuple </ dfn > is the value of the
2101
- < a > [[\PendingRead ]]</ a > internal slot.
2099
+ The < dfn > activated reader objects </ dfn > is the value of the
2100
+ < a > [[\ActivatedReaderList ]]</ a > internal slot.
2102
2101
</ p >
2103
2102
< p >
2104
2103
The < dfn > pending write tuple</ dfn > is the value of the
@@ -2204,8 +2203,8 @@ <h2>The <dfn>record type</dfn> string</h2>
2204
2203
2205
2204
< section > < h3 > Aborting pending write operation</ h3 >
2206
2205
< div >
2207
- To attempt to < dfn > abort a pending write operation</ dfn > on an
2208
- < a > environment settings object </ a > , perform the following steps:
2206
+ To attempt to < dfn > abort a pending write operation</ dfn > ,
2207
+ run the following steps:
2209
2208
< ol class =algorithm >
2210
2209
< li >
2211
2210
If there is no < a > pending write tuple</ a > |tuple|, abort these steps.
@@ -2238,14 +2237,10 @@ <h2>The <dfn>record type</dfn> string</h2>
2238
2237
Attempt to < a > abort a pending write operation</ a > .
2239
2238
</ li >
2240
2239
< li >
2241
- Stop the < a > dispatch NFC content </ a > steps .
2240
+ Clear the < a > activated reader objects </ a > .
2242
2241
</ li >
2243
2242
< li >
2244
- Clear the < a > pending read tuple</ a > .
2245
- </ li >
2246
- < li >
2247
- Release the NFC resources associated with |nfc| on the
2248
- underlying platform.
2243
+ Release the NFC resources on the underlying platform.
2249
2244
</ li >
2250
2245
</ ol >
2251
2246
< p >
@@ -2510,7 +2505,7 @@ <h3><dfn>Writing content</dfn></h3>
2510
2505
Let |records| be the list « |textRecord| ».
2511
2506
</ li >
2512
2507
< li >
2513
- Set |source|'s < a > records</ a > to |records|.
2508
+ Set |source|'s records to |records|.
2514
2509
</ li >
2515
2510
</ ul >
2516
2511
< dt > {{BufferSource}}</ dt >
@@ -2524,13 +2519,13 @@ <h3><dfn>Writing content</dfn></h3>
2524
2519
Let |records| be the list « |mimeRecord| ».
2525
2520
</ li >
2526
2521
< li >
2527
- Set |source|'s < a > records</ a > to |records|.
2522
+ Set |source|'s records to |records|.
2528
2523
</ li >
2529
2524
</ ul >
2530
2525
< dt > {{NDEFMessageInit}}</ dt >
2531
2526
< ul >
2532
2527
< li >
2533
- If |source|'s < a > records</ a > [= list/is empty =], [= exception/throw =]
2528
+ If |source|'s records [= list/is empty =], [= exception/throw =]
2534
2529
a {{TypeError}} and abort these steps.
2535
2530
</ li >
2536
2531
</ ul >
@@ -2548,7 +2543,7 @@ <h3><dfn>Writing content</dfn></h3>
2548
2543
</ li >
2549
2544
< li >
2550
2545
[= list/For each =] |record:NDEFRecordInit| in the < a > list</ a >
2551
- |source|'s < a > records</ a > , run the following steps:
2546
+ |source|'s records, run the following steps:
2552
2547
< ol >
2553
2548
< li >
2554
2549
Let |ndef| be the result of running < a > create NDEF record</ a >
@@ -3397,9 +3392,9 @@ <h3><dfn>Writing content</dfn></h3>
3397
3392
accessible to the client.
3398
3393
</ p >
3399
3394
< p >
3400
- If there is a < a > pending read tuple </ a > whose |reader| is an
3401
- {{NDEFReader}} instance, then the < a > UA</ a > MUST listen to
3402
- < a > NDEF message </ a > s on all connected NFC adapters.
3395
+ If there are any {{NDEFReader}} instances in < a > activated reader objects </ a >
3396
+ then the < a > UA</ a > MUST listen to < a > NDEF message </ a > s on all connected
3397
+ NFC adapters.
3403
3398
</ p >
3404
3399
3405
3400
< section > < h3 > The < strong > scan()</ strong > method</ h3 >
@@ -3416,7 +3411,7 @@ <h3><dfn>Writing content</dfn></h3>
3416
3411
</ li >
3417
3412
< li >
3418
3413
If not currently executing in the currently active < a > top-level
3419
- browsing context</ a > , then reject |p| with and
3414
+ browsing context</ a > , then reject |p| with an
3420
3415
{{"InvalidStateError"}} {{DOMException}} and return |p|.
3421
3416
</ li >
3422
3417
< li >
@@ -3436,23 +3431,16 @@ <h3><dfn>Writing content</dfn></h3>
3436
3431
< li >
3437
3432
If |signal| is not `null`, then
3438
3433
< a data-cite ="dom#abortsignal-abort-algorithms ">
3439
- add the following abort steps</ a > to |signal|:
3440
- < ol >
3441
- < li >
3442
- Clear the < a > pending read tuple</ a > .
3443
- </ li >
3444
- < li >
3445
- Make a request to stop listening to < a > NDEF message</ a > s
3446
- on all < a > NFC adapter</ a > s.
3447
- </ li >
3448
- </ ol >
3449
- </ li >
3450
- < li >
3451
- [=promise/React=] to |p|:
3434
+ add the following < dfn > clean up the pending scan</ dfn > steps</ a >
3435
+ to |signal|:
3452
3436
< ol >
3453
3437
< li >
3454
- If |p| was settled (fulfilled or rejected), then clear the
3455
- < a > pending read tuple</ a > .
3438
+ Remove |reader| from the < a > activated reader objects</ a > .
3439
+ </ li >
3440
+ < li >
3441
+ If the < a > activated reader objects</ a > [= list/is empty =],
3442
+ then make a request to stop listening to < a > NDEF message</ a > s
3443
+ on all < a > NFC adapter</ a > s.
3456
3444
</ li >
3457
3445
</ ol >
3458
3446
</ li >
@@ -3477,7 +3465,12 @@ <h3><dfn>Writing content</dfn></h3>
3477
3465
and abort these steps.
3478
3466
</ li >
3479
3467
< li >
3480
- Set the < a > pending read tuple</ a > to (|p|, |reader|).
3468
+ If |reader| is already in the < a > activated reader objects</ a > ,
3469
+ then reject |p| with an {{"InvalidStateError"}} {{DOMException}}
3470
+ and abort these steps.
3471
+ </ li >
3472
+ < li >
3473
+ Add |reader| to the < a > activated reader objects</ a > .
3481
3474
</ li >
3482
3475
< li >
3483
3476
Resolve |p|.
@@ -3502,10 +3495,14 @@ <h3><dfn>Writing content</dfn></h3>
3502
3495
If the < a > NFC tag</ a > in proximity range does not expose < a > NDEF</ a >
3503
3496
technology for reading or formatting, run the following sub-steps:
3504
3497
< ol >
3505
- < li >
3506
- If there is a < a > pending read tuple</ a > whose |reader| is an
3507
- {{NDEFReader}} instance, fire an event</ a > named "`readingerror`" at
3508
- |reader|.
3498
+ < li > [= list/For each =]
3499
+ {{NDEFReader}} instance |reader:NDEFReader| in the
3500
+ < a > activated reader objects</ a > , run the following sub-steps:
3501
+ < ol >
3502
+ < li >
3503
+ < a > Fire an event</ a > named "`error`" at |reader|.
3504
+ </ li >
3505
+ </ ol >
3509
3506
</ li >
3510
3507
< li >
3511
3508
Abort these steps.
@@ -3572,11 +3569,16 @@ <h3><dfn>Writing content</dfn></h3>
3572
3569
</ p >
3573
3570
< ol class =algorithm >
3574
3571
< li >
3575
- If there is a < a > pending read tuple</ a > whose |reader| is an
3576
- {{NDEFReader}} instance, < a > fire an event</ a > named "`reading`" at
3577
- |reader| using < a > NDEFReadingEvent</ a > with its < a > serialNumber</ a >
3578
- attribute initialized to |serialNumber| and < a > message</ a > attribute
3579
- initialized to |message|.
3572
+ [= list/For each =] {{NDEFReader}} instance |reader:NDEFReader| in
3573
+ the < a > activated reader objects</ a > ,
3574
+ < ol >
3575
+ < li >
3576
+ < a > fire an event</ a > named "`reading`" at |reader| using
3577
+ < a > NDEFReadingEvent</ a > with its < a > serialNumber</ a > attribute
3578
+ initialized to |serialNumber| and its < a > message</ a > attribute
3579
+ initialized to |message|.
3580
+ </ li >
3581
+ </ ol >
3580
3582
</ li >
3581
3583
</ ol >
3582
3584
</ section >
0 commit comments