Re: [web-nfc] Do we want to add support for writing sub records? (#357)

3. About writing embedded records, `NDEFRecordInit#data` could be NDEFMessageInit in case of smart poster records, opaque records and external type records, the data mapping table needs to be updated for this, currently it only has smart poster records.

4. The algo https://w3c.github.io/web-nfc/#creating-ndef-message says
> "opaque"
If record's data is NDEFMessageSource, then return the result of running the create NDEF message given record's data.
Otherwise, map binary data to NDEF.

I think it should be `NDEFMessageInit` rather than `NDEFMessageSource`. `NDEFMessageInit` is a union type including `ArrayBuffer`, in which case we should just use the `ArrayBuffer` directly as payload rather than creating another nested message containing this `ArrayBuffer`.

-- 
GitHub Notification of comment by leonhsl
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/357#issuecomment-541528769 using your GitHub account

Received on Monday, 14 October 2019 07:19:08 UTC