Back to Content

NDEFReadingEvent

files/en-us/web/api/ndefreadingevent/index.md

latest1.1 KB
Original Source

{{APIRef("Web NFC API")}}{{securecontext_header}}{{SeeCompatTable}}

The NDEFReadingEvent interface of the Web NFC API represents events dispatched on new NFC readings obtained by {{DOMxRef("NDEFReader")}}.

{{InheritanceDiagram}}

Constructor

  • {{DOMxRef("NDEFReadingEvent.NDEFReadingEvent", "NDEFReadingEvent.NDEFReadingEvent()")}} {{Experimental_Inline}}
    • : Creates a new NDEFReadingEvent.

Instance properties

Inherits properties from its parent, {{DOMxRef("Event")}}.

  • {{DOMxRef("NDEFReadingEvent.message")}} {{ReadOnlyInline}} {{Experimental_Inline}}
    • : Returns an {{DOMxRef("NDEFMessage")}} object containing the received message.
  • {{DOMxRef("NDEFReadingEvent.serialNumber")}} {{ReadOnlyInline}} {{Experimental_Inline}}
    • : Returns the serial number of the device, which is used for anti-collision and identification, or an empty string if no serial number is available.

Instance methods

Inherits methods from its parent, {{DOMxRef("Event")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}