- From: Kenneth Rohde Christiansen via GitHub <sysbot+gh@w3.org>
- Date: Thu, 02 Jan 2020 12:04:31 +0000
- To: public-web-nfc@w3.org
kenchris has just created a new issue for https://github.com/w3c/web-nfc:
== Prefixing local records with ":" would be simpler than isLocal ==
I don't like isLocal because its optional so easy to get wrong, which is made clear with the last commits "sprinking it" over existing code :)
":" is not a valid first character for local record types, so it is fine.
I think it makes sense because we have local records in namespaced (external records) or standardized records (smart poster). It looks like a namespace where you just didn't explicitly write it out.
It will make make it very explicit where a local record type is used.
```js
writer.push({ records: [
{
recordType: "imdb.com:movies", // Sp
data: { records: [
{
recordType: ":rating",
data: 10
},
{
recordType: ":title",
data: "Rise of Skywalker"
}]
}
});
```
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/501 using your GitHub account
Received on Thursday, 2 January 2020 12:04:32 UTC