Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

MozNDEFRecord.payload

The payload property of the MozNDEFRecord interface is application dependent (for example, a contacts application could contain URLs, mime-types, postal address, etc., to emulate vCards).

Syntax

readonly attribute Uint8Array payload;

Example

var tnf     = 0x1;                                                    // NFC Forum Well Known type
var type    = new Uint8Array(NfcUtils.fromUTF8("U"));                 // URL type
var id      = new Uint8Array(NfcUtils.fromUTF8(""));                  // id
var payload = new Uint8Array(NfcUtils.fromUTF8("\u0003mozilla.org")); // URL data, with a short record prefix 0x3 replacing https://

var ndefRecords = [new MozNDEFRecord(tnf, type, id, payload)];

Value

a Uint8Array.

Specifications

The NFC implementation in Gecko follows the NFC Forum specifications.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support

No support

No support No support No support No support
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support No support No support 2.0 moz [1] No support No support No support

[1] Available in privileged apps as of Firefox OS 2.2; certified-only before that.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, fscholz, teoli
 Last updated by: chrisdavidmills,