Back to Content

NDEFMessage

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

latest885 B
Original Source

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

The NDEFMessage interface of the Web NFC API represents the content of an NDEF message that has been read from or could be written to an NFC tag. An instance is acquired by calling the NDEFMessage() constructor or from the {{domxref("NDEFReadingEvent.message")}} property, which is passed to the {{domxref("NDEFReader.reading_event", "reading")}} event.

Constructor

  • {{DOMxRef("NDEFMessage.NDEFMessage", "NDEFMessage()")}} {{Experimental_Inline}}
    • : Creates a new NDEFMessage object, initialized with the given NDEF records.

Attributes

  • {{DOMxRef("NDEFMessage.records")}} {{ReadOnlyInline}} {{Experimental_Inline}}
    • : Returns the list of NDEF records contained in the message.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}