diff --git a/index.html b/index.html index 2c5a98f..c20f337 100644 --- a/index.html +++ b/index.html @@ -2079,11 +2079,10 @@

The record type string

- [[\PendingRead]] + [[\ActivatedReaderList]] empty set - A <|promise:Promise|, |reader:NDEFReader|> tuple where |promise| - holds a {{Promise}} and |reader| holds an {{NDEFReader}}. + A set of {{NDEFReader}} instances. @@ -2097,8 +2096,8 @@

The record type string

- The pending read tuple is the value of the - [[\PendingRead]] internal slot. + The activated reader objects is the value of the + [[\ActivatedReaderList]] internal slot.

The pending write tuple is the value of the @@ -2204,8 +2203,8 @@

The record type string

Aborting pending write operation

- To attempt to abort a pending write operation on an - environment settings object, perform the following steps: + To attempt to abort a pending write operation, + run the following steps:
  1. If there is no pending write tuple |tuple|, abort these steps. @@ -2238,14 +2237,10 @@

    The record type string

    Attempt to abort a pending write operation.
  2. - Stop the dispatch NFC content steps. + Clear the activated reader objects.
  3. - Clear the pending read tuple. -
  4. -
  5. - Release the NFC resources associated with |nfc| on the - underlying platform. + Release the NFC resources on the underlying platform.

@@ -2510,7 +2505,7 @@

Writing content

Let |records| be the list « |textRecord| ».
  • - Set |source|'s records to |records|. + Set |source|'s records to |records|.
  • {{BufferSource}}
    @@ -2524,13 +2519,13 @@

    Writing content

    Let |records| be the list « |mimeRecord| ».
  • - Set |source|'s records to |records|. + Set |source|'s records to |records|.
  • {{NDEFMessageInit}}
    @@ -2548,7 +2543,7 @@

    Writing content

  • [= list/For each =] |record:NDEFRecordInit| in the list - |source|'s records, run the following steps: + |source|'s records, run the following steps:
    1. Let |ndef| be the result of running create NDEF record @@ -3397,9 +3392,9 @@

      Writing content

      accessible to the client.

      - If there is a pending read tuple whose |reader| is an - {{NDEFReader}} instance, then the UA MUST listen to - NDEF messages on all connected NFC adapters. + If there are any {{NDEFReader}} instances in activated reader objects + then the UA MUST listen to NDEF messages on all connected + NFC adapters.

      The scan() method

      @@ -3416,7 +3411,7 @@

      Writing content

    2. If not currently executing in the currently active top-level - browsing context, then reject |p| with and + browsing context, then reject |p| with an {{"InvalidStateError"}} {{DOMException}} and return |p|.
    3. @@ -3436,23 +3431,16 @@

      Writing content

    4. If |signal| is not `null`, then - add the following abort steps to |signal|: -
        -
      1. - Clear the pending read tuple . -
      2. -
      3. - Make a request to stop listening to NDEF messages - on all NFC adapters. -
      4. -
      -
    5. -
    6. - [=promise/React=] to |p|: + add the following clean up the pending scan steps + to |signal|:
      1. - If |p| was settled (fulfilled or rejected), then clear the - pending read tuple. + Remove |reader| from the activated reader objects. +
      2. +
      3. + If the activated reader objects [= list/is empty =], + then make a request to stop listening to NDEF messages + on all NFC adapters.
    7. @@ -3477,7 +3465,12 @@

      Writing content

      and abort these steps.
    8. - Set the pending read tuple to (|p|, |reader|). + If |reader| is already in the activated reader objects, + then reject |p| with an {{"InvalidStateError"}} {{DOMException}} + and abort these steps. +
    9. +
    10. + Add |reader| to the activated reader objects.
    11. Resolve |p|. @@ -3502,10 +3495,14 @@

      Writing content

      If the NFC tag in proximity range does not expose NDEF technology for reading or formatting, run the following sub-steps:
        -
      1. - If there is a pending read tuple whose |reader| is an - {{NDEFReader}} instance, fire an event named "`readingerror`" at - |reader|. +
      2. [= list/For each =] + {{NDEFReader}} instance |reader:NDEFReader| in the + activated reader objects, run the following sub-steps: +
          +
        1. + Fire an event named "`error`" at |reader|. +
        2. +
      3. Abort these steps. @@ -3572,11 +3569,16 @@

        Writing content

        1. - If there is a pending read tuple whose |reader| is an - {{NDEFReader}} instance, fire an event named "`reading`" at - |reader| using NDEFReadingEvent with its serialNumber - attribute initialized to |serialNumber| and message attribute - initialized to |message|. + [= list/For each =] {{NDEFReader}} instance |reader:NDEFReader| in + the activated reader objects, +
            +
          1. + fire an event named "`reading`" at |reader| using + NDEFReadingEvent with its serialNumber attribute + initialized to |serialNumber| and its message attribute + initialized to |message|. +
          2. +