blob: a5709161bdb45f7a02bdd9b78f73febd8d21e222 [file] [log] [blame]
// 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/)
dictionary NDEFMessage {
DOMString? serialNumber;
sequence<NDEFRecord> records;
USVString url;
};
typedef (DOMString or unrestricted double or ArrayBuffer or Dictionary) NDEFRecordData;
dictionary NDEFRecord {
NDEFRecordType recordType;
USVString mediaType;
NDEFRecordData data;
};
enum NDEFRecordType {
"empty",
"text",
"url",
"json",
"opaque"
};
typedef (DOMString or ArrayBuffer or NDEFMessage) NDEFMessageSource;
[Constructor(), SecureContext, Exposed=Window]
interface NFCWriter {
Promise<void> push(NDEFMessageSource message, optional NFCPushOptions options);
};
[Constructor(optional NFCReaderOptions options), SecureContext, Exposed=Window]
interface NFCReader : EventTarget {
attribute EventHandler onreading;
attribute EventHandler onerror;
void start();
void stop();
};
[Constructor(DOMString type, NFCReadingEventInit readingEventInitDict), SecureContext, Exposed=Window]
interface NFCReadingEvent : Event {
readonly attribute NDEFMessage message;
};
dictionary NFCReadingEventInit : EventInit {
required NDEFMessage message;
};
[Constructor(DOMString type, NFCErrorEventInit errorEventInitDict), SecureContext, Exposed=Window]
interface NFCErrorEvent : Event {
readonly attribute DOMException error;
};
dictionary NFCErrorEventInit : EventInit {
required DOMException error;
};
enum NDEFCompatibility {
"nfc-forum",
"vendor",
"any"
};
dictionary NFCPushOptions {
NFCPushTarget target = "any";
unrestricted double timeout = Infinity;
boolean ignoreRead = true;
AbortSignal? signal;
NDEFCompatibility compatibility = "nfc-forum";
};
enum NFCPushTarget {
"tag",
"peer",
"any"
};
dictionary NFCReaderOptions {
USVString url = "";
NDEFRecordType recordType;
USVString mediaType = "";
NDEFCompatibility compatibility = "nfc-forum";
};