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
- Using the NFC API
- Using the NFC emulator
- Introduction to NFC (fairly long reference doc, featuring general NFC terms, and some Nokia platform specifics.)