New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support external types as custom types #278
Conversation
index.html
Outdated
@@ -3164,19 +3164,19 @@ <h3>Receiving and parsing content</h3> | |||
Using the <a data-cite="encoding#encoder">encoder</a>, it is only possible | |||
to encode as UTF-8, unless you do the encoding manually | |||
and use the "`opaque`" | |||
<a href="#the-ndefrecordtype-enum">recordType</a>, which | |||
<a href="#the-ndefrecordtype-type">recordType</a>, which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note, you should never need href=
... ReSpec should do that.
@@ -1366,34 +1366,44 @@ <h2>The <dfn>NDEFRecordType</dfn> enum</h2> | |||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<h2>The <dfn>NDEFRecordType</dfn> enum</h2>
It's not an enum anymore.
index.html
Outdated
The enum value representing <a>NDEFRecord</a> of an <a href="#dfn-opaque">opaque</a> type. | ||
The value representing <a>NDEFRecord</a> of an <a href="#dfn-opaque">opaque</a> type. | ||
</dd> | ||
<dt><dfn>External type</dfn></dt> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need add the external type to the data mapping table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is done, try the preview
index.html
Outdated
<dt><dfn>External type</dfn></dt> | ||
<dd> | ||
A {{DOMString}} representing a custom type for the <a>external type record</a>. | ||
The type must follow the [[NFC-RTD]] and thus, be a URN with the NID of "`nfc`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type must follow the [[NFC-RTD]] and thus, be a URN with the NID of "`nfc`" | |
The type must follow the [[[NFC-RTD]]] and thus, be a URN with the NID of "`nfc`" |
This seems self contradicting... an enum is a white list, but the you have a DOMString that basically says anything goes. |
I think you basically just want to take a DOMString, then have a case statement that checks the string values... and throws a "NotSupportedError" when the passed value is unknown. |
OK, so I just make it a string... but I still want to list common standardized values |
another question, can this be used as fingerprinting entropy? That is, can I poke at the implementation to find out what urns recognizes? And is there are a potential that the urns will vary from one device to another? |
No, all implementations should support the same URNs... |
ok, cool... then why not just all the urns in the enum? |
index.html
Outdated
for organizations to create their own custom <dfn>external type</dfn>s, | ||
following the following ABNF (specialization of URN) as explained in | ||
the [[[NFC-RTD]]]: | ||
<pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<pre> | |
<pre class="abnf"> |
So talked with riju on chat and he approved this change |
This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04
@kenchris did you have an answer for this? |
This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04
There are an infinite amount as they are user definable |
Thanks for clarifying. Some values of |
This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04
This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.han@intel.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> Cr-Commit-Position: refs/heads/master@{#694635}
This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.han@intel.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> Cr-Commit-Position: refs/heads/master@{#694635}
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
…ordType", a=testonly Automatic update from web-platform-tests [webnfc] Impl "typedef DOMString NDEFRecordType" This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.han@intel.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> Cr-Commit-Position: refs/heads/master@{#694635} -- wpt-commits: 40b84d01bb93c79032789229f0a9cbab5197e2de wpt-pr: 18868
…ordType", a=testonly Automatic update from web-platform-tests [webnfc] Impl "typedef DOMString NDEFRecordType" This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.han@intel.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> Cr-Commit-Position: refs/heads/master@{#694635} -- wpt-commits: 40b84d01bb93c79032789229f0a9cbab5197e2de wpt-pr: 18868
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
…ordType", a=testonly Automatic update from web-platform-tests [webnfc] Impl "typedef DOMString NDEFRecordType" This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.hanintel.com> Reviewed-by: Daniel Cheng <dchengchromium.org> Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumikintel.com> Cr-Commit-Position: refs/heads/master{#694635} -- wpt-commits: 40b84d01bb93c79032789229f0a9cbab5197e2de wpt-pr: 18868 UltraBlame original commit: e393d8834a4d28cfe1026e82bf6fc817e9c5b931
…ordType", a=testonly Automatic update from web-platform-tests [webnfc] Impl "typedef DOMString NDEFRecordType" This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.hanintel.com> Reviewed-by: Daniel Cheng <dchengchromium.org> Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumikintel.com> Cr-Commit-Position: refs/heads/master{#694635} -- wpt-commits: 40b84d01bb93c79032789229f0a9cbab5197e2de wpt-pr: 18868 UltraBlame original commit: e393d8834a4d28cfe1026e82bf6fc817e9c5b931
…ordType", a=testonly Automatic update from web-platform-tests [webnfc] Impl "typedef DOMString NDEFRecordType" This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.hanintel.com> Reviewed-by: Daniel Cheng <dchengchromium.org> Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumikintel.com> Cr-Commit-Position: refs/heads/master{#694635} -- wpt-commits: 40b84d01bb93c79032789229f0a9cbab5197e2de wpt-pr: 18868 UltraBlame original commit: e393d8834a4d28cfe1026e82bf6fc817e9c5b931
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#705377}
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#705377}
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#705377}
…e records, a=testonly Automatic update from web-platform-tests [webnfc] Support read/write external type records Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#705377} -- wpt-commits: e4c65276b686cd788b2c4f8c395025df371e84a1 wpt-pr: 18926
…e records, a=testonly Automatic update from web-platform-tests [webnfc] Support read/write external type records Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#705377} -- wpt-commits: e4c65276b686cd788b2c4f8c395025df371e84a1 wpt-pr: 18926
…e records, a=testonly Automatic update from web-platform-tests [webnfc] Support read/write external type records Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillygchromium.org> Commit-Queue: Leon Han <leon.hanintel.com> Cr-Commit-Position: refs/heads/master{#705377} -- wpt-commits: e4c65276b686cd788b2c4f8c395025df371e84a1 wpt-pr: 18926 UltraBlame original commit: a6cbcd03a32381253779e10837c27a3d5a27f996
…e records, a=testonly Automatic update from web-platform-tests [webnfc] Support read/write external type records Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillygchromium.org> Commit-Queue: Leon Han <leon.hanintel.com> Cr-Commit-Position: refs/heads/master{#705377} -- wpt-commits: e4c65276b686cd788b2c4f8c395025df371e84a1 wpt-pr: 18926 UltraBlame original commit: a6cbcd03a32381253779e10837c27a3d5a27f996
…e records, a=testonly Automatic update from web-platform-tests [webnfc] Support read/write external type records Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillygchromium.org> Commit-Queue: Leon Han <leon.hanintel.com> Cr-Commit-Position: refs/heads/master{#705377} -- wpt-commits: e4c65276b686cd788b2c4f8c395025df371e84a1 wpt-pr: 18926 UltraBlame original commit: a6cbcd03a32381253779e10837c27a3d5a27f996
This CL switches the IDL type definition from "enum NDEFRecordType { "empty", "text", "url", "json", "opaque" };" to "typedef DOMString NDEFRecordType" according to web-nfc spec. This is in preparation for supporting 'smart-poster' and external type records in the future, which was added in w3c/web-nfc#278. BUG=520391 Change-Id: I45ec31afb3841cc5b12c954ffc2821da357fef04 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781510 Commit-Queue: Leon Han <leon.han@intel.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> Cr-Commit-Position: refs/heads/master@{#694635} Former-commit-id: 83ba9b67f518b5a3032f92a461c16e798208821f
Note: not support sub-records yet. The corresponding spec changes: w3c/web-nfc#278 w3c/web-nfc#326 and the relevant issue: w3c/web-nfc#331 BUG=520391,995234 Change-Id: I5b99543bddf505975567ecad22c0d5390842337f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791533 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Leon Han <leon.han@intel.com> Cr-Commit-Position: refs/heads/master@{#705377} Former-commit-id: c7d9c337303afef2f456cd4846a850d0a1e256b4
@Honry
Something like this @marcoscaceres
Preview | Diff