[webnfc] Support writing/reading local type records #21157
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some notable points:
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"
Only "smart-poster", external, and local type records are supposed to
be able to carry a ndef message as payload.
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:
w3c/web-nfc#491
w3c/web-nfc#493
w3c/web-nfc#495
w3c/web-nfc#502
w3c/web-nfc#506
BUG=520391
Change-Id: Ic2890c031109aa583437ac93a8901ff71992af78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1996946
Reviewed-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}