Re: [web-nfc] reg-name ABNF is unspecified (#350)

> The only other bit I would flag, and I fully admit I'm not an expert here and so you'll want to find someone better versed in the Web Platform idioms, is where/how an error should be signaled for an unsupported recordType. Right now, if I understand correctly, I can create a 'valid' NDEFRecord via NDEFRecordInit, but whose recordType is invalid/unparsable. That error is not actually signaled back to the consumer until they try NDEFWriter.push, which invokes the create NDEF message algorithm, which invokes create NDEF record, which invokes validate external type.
>
> Because you expose the constructor for NDEFRecord, should you be parsing/validating the type then? The URL class, for better or worse, has setters which do the parsing/validation. I'm not sure why the NDEFRecord type is read-only (maybe that's the current best practice), but it seems that you at least want to validate during that constructor as well, to ensure a client only encounters well-formed NDEFRecords

Created #510 to track this.

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

Received on Friday, 3 January 2020 10:36:15 UTC