Re: [web-nfc] NFCReadingEvent has an attribute with a type of dictionary? (#232)

(Editable comment)
Feel free to update this as we create examples and agree on new API

```webidl
[Constructor(NDEFMessageInit messageInit)]
interface NDEFMessage {
  readonly attribute USVString url;
  readonly attribute FrozenArray<NDEFRecord> records;
}

[Constructor(NDEFRecordInit recordInit)]
interface NDEFRecord {
  readonly attribute NDEFRecordType recordType;
  readonly attribute USVString mediaType;
  [NewObject] DOMString string();
  [NewObject] any json();
  [NewObject] ArrayBuffer data();
}

dictionary NDEFMessageInit {
  USVString url;
  sequence<NDEFRecordInit> records;
};

dictionary NDEFRecordInit {
  NDEFRecordType recordType;
  USVString mediaType;
  NDEFRecordData data;
};
```

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/232#issuecomment-506281574 using your GitHub account

Received on Thursday, 27 June 2019 10:02:16 UTC