mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 12:15:33 +00:00
Bug 1529810 [wpt PR 15427] - Update interfaces/web-nfc.idl, a=testonly
Automatic update from web-platform-tests Update interfaces/web-nfc.idl (#15427) Source: https://github.com/tidoust/reffy-reports/blob/9c32f49/whatwg/idl/web-nfc.idl Build: https://travis-ci.org/tidoust/reffy-reports/builds/494128798 -- wpt-commits: eadb35a85e995c845d20720c1d3310248a2554f3 wpt-pr: 15427
This commit is contained in:
parent
d94aab8d35
commit
cefa032b30
@ -3,20 +3,20 @@
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: Web NFC API (https://w3c.github.io/web-nfc/)
|
||||
|
||||
dictionary NFCMessage {
|
||||
sequence<NFCRecord> records;
|
||||
dictionary NDEFMessage {
|
||||
sequence<NDEFRecord> records;
|
||||
USVString url;
|
||||
};
|
||||
|
||||
typedef (DOMString or unrestricted double or ArrayBuffer or Dictionary) NFCRecordData;
|
||||
typedef (DOMString or unrestricted double or ArrayBuffer or Dictionary) NDEFRecordData;
|
||||
|
||||
dictionary NFCRecord {
|
||||
NFCRecordType recordType;
|
||||
dictionary NDEFRecord {
|
||||
NDEFRecordType recordType;
|
||||
USVString mediaType;
|
||||
NFCRecordData data;
|
||||
NDEFRecordData data;
|
||||
};
|
||||
|
||||
enum NFCRecordType {
|
||||
enum NDEFRecordType {
|
||||
"empty",
|
||||
"text",
|
||||
"url",
|
||||
@ -24,11 +24,11 @@ enum NFCRecordType {
|
||||
"opaque"
|
||||
};
|
||||
|
||||
typedef (DOMString or ArrayBuffer or NFCMessage) NFCMessageSource;
|
||||
typedef (DOMString or ArrayBuffer or NDEFMessage) NDEFMessageSource;
|
||||
|
||||
[Constructor(), SecureContext, Exposed=Window]
|
||||
interface NFCWriter {
|
||||
Promise<void> push(NFCMessageSource message, optional NFCPushOptions options);
|
||||
Promise<void> push(NDEFMessageSource message, optional NFCPushOptions options);
|
||||
};
|
||||
|
||||
[Constructor(optional NFCReaderOptions options), SecureContext, Exposed=Window]
|
||||
@ -42,11 +42,11 @@ interface NFCReader : EventTarget {
|
||||
|
||||
[Constructor(DOMString type, NFCReadingEventInit readingEventInitDict), SecureContext, Exposed=Window]
|
||||
interface NFCReadingEvent : Event {
|
||||
readonly attribute NFCMessage message;
|
||||
readonly attribute NDEFMessage message;
|
||||
};
|
||||
|
||||
dictionary NFCReadingEventInit : EventInit {
|
||||
required NFCMessage message;
|
||||
required NDEFMessage message;
|
||||
};
|
||||
|
||||
[Constructor(DOMString type, NFCErrorEventInit errorEventInitDict), SecureContext, Exposed=Window]
|
||||
@ -58,11 +58,18 @@ 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 {
|
||||
@ -73,6 +80,7 @@ enum NFCPushTarget {
|
||||
|
||||
dictionary NFCReaderOptions {
|
||||
USVString url = "";
|
||||
NFCRecordType recordType;
|
||||
NDEFRecordType recordType;
|
||||
USVString mediaType = "";
|
||||
NDEFCompatibility compatibility = "nfc-forum";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user