[webnfc] Support writing/reading local type records
Some notable points: 1) Local type in WebNFC APIs is always prefixed by ':', but, the ':' will be omitted when it's actually written into the nfc tag. ":act" --> "act" to be written as the TYPE field into the nfc tag. ":text" --> "text" The reading direction is vice versa. "act" --> ":act" to be exposed as NDEFRecord#recordType. "text" --> ":text" 2) Only "smart-poster", external, and local type records are supposed to be able to carry a ndef message as payload. 3) Local type is only expected to exist inside a ndef message that is another ndef record's payload. Top level ndef message is not allowed to have a local type record. The spec changes: https://github.com/w3c/web-nfc/pull/491 https://github.com/w3c/web-nfc/pull/493 https://github.com/w3c/web-nfc/pull/495 https://github.com/w3c/web-nfc/pull/502 https://github.com/w3c/web-nfc/pull/506 BUG=520391 Change-Id: Ic2890c031109aa583437ac93a8901ff71992af78 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1996946Reviewed-by:Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#737290}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment