File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 4
4
// Changes:
5
5
// - reintroduce watch (since addEventListener is not allowed to prompt, and
6
6
// events vs watches were tricky to implement: too many corner cases
7
- // - reintroduce watch options, with URL patterns
7
+ // - reintroduce watch options, filtering on URL patterns, data type etc.
8
8
// - replace onmessage event with MessageCallback
9
9
// - change send() to pushMessage() - better aligned with semantics
10
10
// - add timeout to push options
@@ -29,19 +29,22 @@ interface NFCAdapter {
29
29
30
30
callback MessageCallback = void (NFCMessage message, USVString url);
31
31
32
- enum NFCDeviceType { "tag", "peer", "any" };
33
-
34
32
dictionary NFCWatchOptions {
35
33
USVString url; // domain/path or URL pattern
36
34
USVString kind;
37
35
USVString type;
36
+ NFCWatchMode mode;
38
37
}
39
38
39
+ enum NFCWatchMode { "web-only", "all" };
40
+
40
41
dictionary NFCPushOptions {
41
42
NFCDeviceType target;
42
43
long timeout; // in ms, default (and max) is 10sec, UAs MAY shorten it
43
44
};
44
45
46
+ enum NFCPushTarget { "tag", "peer", "any" };
47
+
45
48
dictionary NFCRecord {
46
49
NFCRecordType kind; // based on TNF + JSON
47
50
USVString type; // IANA media type, with parameters
You can’t perform that action at this time.
0 commit comments