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

> https://w3c.github.io/web-nfc/#data-mapping is saying toRecords() is only available to smart poster records. It should be available to external type records (TNF=4) and unknown type records (TNF=5) as well.

In my interpretation that table was meant to say what mappings should work, not what is available on the object.

Yes, `toRecords()` may return an `NDEFMessage` for TNF=1 "Sp", TNF=4 and TNF=5 as already explained in the [algo](https://w3c.github.io/web-nfc/#dfn-convert-ndefrecord-payloaddata-bytes). 
In all other case it might be available but will return `null` or will throw.

You are right that the data mapping table should be updated, but it should be emphasised that it's not about the presence of a getter, but what is supposed (meant) to work.

> introduces a new concept local types for embedded records, which I think needs to be regulated by https://w3c.github.io/web-nfc/#dom-ndefrecordtype as well.

The local types are defined [here](https://w3c.github.io/web-nfc/#well-known-type-records-tnf-1).


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

Received on Saturday, 12 October 2019 17:28:51 UTC