From 27ad50e99c4fe2286fe44c0e28ac1516e03efeef Mon Sep 17 00:00:00 2001 From: Zoltan Kis Date: Wed, 2 Sep 2015 09:53:03 +0300 Subject: [PATCH] Added compatibility mode flag NFCWatchMode to NFCWatchOptions --- idl/draft.idl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/idl/draft.idl b/idl/draft.idl index 56f33c0..3d4ba89 100644 --- a/idl/draft.idl +++ b/idl/draft.idl @@ -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 @@ -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