Re: [web-nfc] Add a bit more clarification about local type (#411)

The way I understand it (and I may be wrong) is that local types are meant to avoid repeating the base record type. See example below

before 
```js
const writer = new NDEFWriter();
writer.push({ records: [
  {
    recordType: "example.com:shoppingItem",
    data: { records: [
      {
        recordType: "example.com:shoppingItemUrl",
        data: new TextEncoder('').encoder('https://example.com/123')
      },
      {
        recordType: "example.com:shoppingItemName",
        data: new TextEncoder('').encoder('NFC Tag')
      },
      {
        recordType: "example.com:shoppingItemDescription",
        data: new TextEncoder('').encoder('Pretty cool')
      },
  }
]});
```

after


```js
const writer = new NDEFWriter();
writer.push({ records: [
  {
    recordType: "example.com:shoppingItem",
    data: { records: [
      {
        recordType: "u",
        data: new TextEncoder('').encoder('https://example.com/123')
      },
      {
        recordType: "n",
        data: new TextEncoder('').encoder('NFC Tag')
      },
      {
        recordType: "d",
        data: new TextEncoder('').encoder('Pretty cool')
      },
  }
]});
```


-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at https://github.com/w3c/web-nfc/pull/411#issuecomment-545860806 using your GitHub account

Received on Thursday, 24 October 2019 10:46:28 UTC