Skip to content

Commit 85ad597

Browse files
committed
Merge pull request #43 from zolkis/gh-pages
draft.idl: Added compatibility mode flag NFCWatchMode to NFCWatchOptions
2 parents 033ace0 + 27ad50e commit 85ad597

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

idl/draft.idl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Changes:
55
// - reintroduce watch (since addEventListener is not allowed to prompt, and
66
// 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.
88
// - replace onmessage event with MessageCallback
99
// - change send() to pushMessage() - better aligned with semantics
1010
// - add timeout to push options
@@ -29,19 +29,22 @@ interface NFCAdapter {
2929

3030
callback MessageCallback = void (NFCMessage message, USVString url);
3131

32-
enum NFCDeviceType { "tag", "peer", "any" };
33-
3432
dictionary NFCWatchOptions {
3533
USVString url; // domain/path or URL pattern
3634
USVString kind;
3735
USVString type;
36+
NFCWatchMode mode;
3837
}
3938

39+
enum NFCWatchMode { "web-only", "all" };
40+
4041
dictionary NFCPushOptions {
4142
NFCDeviceType target;
4243
long timeout; // in ms, default (and max) is 10sec, UAs MAY shorten it
4344
};
4445

46+
enum NFCPushTarget { "tag", "peer", "any" };
47+
4548
dictionary NFCRecord {
4649
NFCRecordType kind; // based on TNF + JSON
4750
USVString type; // IANA media type, with parameters

0 commit comments

Comments
 (0)