[web-nfc] toRecords() should be nullable or not? (#487)

leonhsl has just created a new issue for https://github.com/w3c/web-nfc:

== toRecords() should be nullable or not? ==
I think `toRecords`() is better to be nullable.
It returning null indicates this `Sp/external` record's payload is just a plain buffer but not an NDEF message at all, and returning an empty sequence indicates the payload is an NDEF message that does not have any record.

Currently the spec https://w3c.github.io/web-nfc/#dfn-parse-records-from-bytes makes `toRecords`() return an empty sequence for both the cases mentioned above.

WDYT? The background is https://chromium-review.googlesource.com/c/chromium/src/+/1980586, we need to change either spec or impl to keep them consistent.
 @kenchris  @zolkis  @beaufortfrancois @riju 

Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/487 using your GitHub account

Received on Tuesday, 24 December 2019 08:56:51 UTC