Closed Bug 964190 Opened 11 years ago Closed 10 years ago

B2G NFC: using dictionary for MozNDEFRecord.

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: allstars.chh, Unassigned)

References

Details

This is mentioned by Jonas during last NFC API review. after Bug 964186 and Bug 960510 are landed, we should see if we can make MozNDEFRecord is a dictionaty object, not an interface. If we use interface writeNDEF([new MozNdefRecord(0x01, myTypeArray, myIdArray, payload), new MozNdefRecord(0x03, null, myIdArray, payload)]); If we use Dictionary writeNDEF([{ tnf: 0x01, type: myTypeArray, id: myIdArray, payload: payload }, { tnf: 0x03, id: myIdArray, payload: payload }]); writeNDEF([{ tnf: 0x01, payload: payload }, { tnf: 0x03, payload: payload2 }]);
This isn't a critical issue though. Just made the API somewhat easier to use. Happy to defer this to later.
There's NFC system messages that are sending the original Uint8Arrays still (and partly because the MozNDEFRecord interface object doesn't seem to transfer between NFC Manager and Apps). The reason to keep interfaces however is that NFCPeer.sendNDEF and NFCTag.writeNDEF are currently strongly typed via WebIDL, and can come from web content.
blocking-b2g: --- → backlog
In Bug 1007724 we will do validation on NDEFRecord, and Bug 1053732 will allow initializing by dictionary, this should fit what Jonas suggested in the first place, so I close this as WONTFIX.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.