Skip to content

Commit

Permalink
Merge pull request #43 from zolkis/gh-pages
Browse files Browse the repository at this point in the history
draft.idl: Added compatibility mode flag NFCWatchMode to NFCWatchOptions
  • Loading branch information
zolkis committed Sep 2, 2015
2 parents 033ace0 + 27ad50e commit 85ad597
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions idl/draft.idl
Expand Up @@ -4,7 +4,7 @@
// Changes:
// - reintroduce watch (since addEventListener is not allowed to prompt, and
// events vs watches were tricky to implement: too many corner cases
// - reintroduce watch options, with URL patterns
// - reintroduce watch options, filtering on URL patterns, data type etc.
// - replace onmessage event with MessageCallback
// - change send() to pushMessage() - better aligned with semantics
// - add timeout to push options
Expand All @@ -29,19 +29,22 @@ interface NFCAdapter {

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

enum NFCDeviceType { "tag", "peer", "any" };

dictionary NFCWatchOptions {
USVString url; // domain/path or URL pattern
USVString kind;
USVString type;
NFCWatchMode mode;
}

enum NFCWatchMode { "web-only", "all" };

dictionary NFCPushOptions {
NFCDeviceType target;
long timeout; // in ms, default (and max) is 10sec, UAs MAY shorten it
};

enum NFCPushTarget { "tag", "peer", "any" };

dictionary NFCRecord {
NFCRecordType kind; // based on TNF + JSON
USVString type; // IANA media type, with parameters
Expand Down

0 comments on commit 85ad597

Please sign in to comment.