| // GENERATED CONTENT - DO NOT EDIT |
| // Content was automatically extracted by Reffy into reffy-reports |
| // (https://github.com/tidoust/reffy-reports) |
| // Source: Web NFC API (https://w3c.github.io/web-nfc/) |
| |
| [Exposed=Window] |
| interface NDEFMessage { |
| constructor(NDEFMessageInit messageInit); |
| readonly attribute FrozenArray<NDEFRecord> records; |
| }; |
| |
| dictionary NDEFMessageInit { |
| sequence<NDEFRecordInit> records; |
| }; |
| |
| typedef any NDEFRecordData; |
| |
| [Exposed=Window] |
| interface NDEFRecord { |
| constructor(NDEFRecordInit recordInit); |
| |
| readonly attribute NDEFRecordType recordType; |
| readonly attribute USVString mediaType; |
| readonly attribute USVString id; |
| |
| USVString? toText(); |
| [NewObject] ArrayBuffer? toArrayBuffer(); |
| [NewObject] any toJSON(); |
| sequence<NDEFRecord> toRecords(); |
| }; |
| |
| dictionary NDEFRecordInit { |
| NDEFRecordType recordType; |
| USVString mediaType; |
| USVString id; |
| |
| NDEFRecordData data; |
| }; |
| |
| typedef DOMString NDEFRecordType; |
| |
| typedef (DOMString or ArrayBuffer or NDEFMessageInit) NDEFMessageSource; |
| |
| [SecureContext, Exposed=Window] |
| interface NFCWriter { |
| constructor(); |
| |
| Promise<void> push(NDEFMessageSource message, optional NFCPushOptions options={}); |
| }; |
| |
| [SecureContext, Exposed=Window] |
| interface NFCReader : EventTarget { |
| constructor(); |
| |
| attribute EventHandler onreading; |
| attribute EventHandler onerror; |
| |
| void scan(optional NFCScanOptions options={}); |
| }; |
| |
| [SecureContext, Exposed=Window] |
| interface NFCReadingEvent : Event { |
| constructor(DOMString type, NFCReadingEventInit readingEventInitDict); |
| |
| readonly attribute DOMString serialNumber; |
| [SameObject] readonly attribute NDEFMessage message; |
| }; |
| |
| dictionary NFCReadingEventInit : EventInit { |
| DOMString? serialNumber = ""; |
| required NDEFMessageInit message; |
| }; |
| |
| [SecureContext, Exposed=Window] |
| interface NFCErrorEvent : Event { |
| constructor(DOMString type, NFCErrorEventInit errorEventInitDict); |
| |
| readonly attribute DOMException error; |
| }; |
| |
| dictionary NFCErrorEventInit : EventInit { |
| required DOMException error; |
| }; |
| |
| dictionary NFCPushOptions { |
| NFCPushTarget target = "any"; |
| unrestricted double timeout = Infinity; |
| boolean ignoreRead = true; |
| AbortSignal? signal; |
| }; |
| |
| enum NFCPushTarget { |
| "tag", |
| "peer", |
| "any" |
| }; |
| |
| dictionary NFCScanOptions { |
| USVString id = ""; |
| NDEFRecordType recordType; |
| USVString mediaType = ""; |
| AbortSignal? signal; |
| }; |