B2G OS

MozNFCTag.getDetailsNDEF()

The getDetailsNDEF() method of the MozNFCTag interface retrieves basic metadata describing the NDEF tag.

Syntax

DOMRequest getDetailsNDEF();

Example

var req = ndefTag.getDetailsNDEF();
req.onsuccess() {
  var details = this.result;
  console.log("isReadOnly: " + details.isReadOnly);
  console.log("canBeMadeReadOnly: " + details.canBeMadeReadOnly);
  console.log("maxSupportedLength: " + details.maxSupportedLength);
}
req.onerror() {
  console.log("Error status string:" + this.error.name);
};

Parameters

None.

Returns

A DOMRequest object.

Errors

See onerror().

Specifications

The NFC implementation in Gecko follows the NFC Forum specifications.

Browser compatibility

Supported in Firefox OS 2.0 for certified-apps.
Available in privileged apps as of Firefox OS 2.2.

See also

Document Tags and Contributors

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