- From: Nicholas Doty <npdoty@w3.org>
- Date: Tue, 7 Feb 2012 21:45:02 -0800
- To: "public-tracking@w3.org (public-tracking@w3.org)" <public-tracking@w3.org>
The user-agent-managed site-specific exception API should be asynchronous to provide the opportunity for user agents to prompt users for their permission (though they may not always do this). The following IDL/proposal uses a callback so that sites can continue execution while waiting for a response to their permissions request. (I'll send out a longer HTML snippet with the other changes to this API proposed by Mozilla/Microsoft folks hopefully very soon.) Thanks, Nick <dl class="idl" title='[NoInterfaceObject] interface NavigatorDoNotTrack'> <dt>void requestSiteSpecificTrackingException(in sequence<DOMString> arrayOfDomainStrings, in TrackingResponseCallback callback)</dt> <dd>Called by a page to request or confirm a site-specific tracking exception.</dd> </dl> <dl class="idl" title='[Callback, NoInterfaceObject] interface TrackingResponseCallback'> <dt>void handleEvent(in boolean granted)</dt> <dd><code>granted</code> is true if the user granted all of the exceptions, false if any exceptions were not granted.</dd> </dl> <p> The <code>requestSiteSpecificTrackingException</code> method takes two arguments: <code>arrayOfDomainStrings</code> a JavaScript array of strings and <code>callback</code>, a method which will be called when the request is completed. Each string in <code>arrayOfDomainStrings</code> specifies a document origin of a tracking element used by the site invoking this function. The special string <code>*</code> signifies all document origins. When called, the <code>requestSiteSpecificTrackingException</code> method MUST return immediately and then asynchronously determine whether the user grants the requested exceptions. </p> <p> User agents MAY provide a user interface prompting the user to choose whether to provide site-specific exceptions to Do Not Track for the requested origins, or, if pre-configured to accept or reject these permissions, respond with the user's previously configured preference. </p> <p class="note">Sites should be aware that a user agent may interactively prompt the user when this method is called and sites should not assume that the callback function will always be called immediately.</p>
Received on Wednesday, 8 February 2012 05:47:13 UTC