- From: Mike O'Neill <michael.oneill@baycloud.com>
- Date: Sat, 29 Apr 2017 12:33:33 +0100
- To: "'Shane M Wiley'" <wileys@yahoo-inc.com>, "'Matthias Schunter \(Intel Corporation\)'" <mts-std@schunter.org>, "'Rob van Eijk'" <rob@blaeu.com>, <public-tracking@w3.org>
- Message-ID: <2a5501d2c0dc$6fd4f090$4f7ed1b0$@baycloud.com>
There is no reason to define the EventTarget, as the events only makes sense applied to the script origin’s document object. I also made it a bit easier to read. Subresource Event API This defines a new Event type SubresourceEvent which are sent to the document object in response to HTTP request activity within a browsing context. Each event contains an arbitrary number of Subresource objects denoting the domain names of resources most recently requested by the browsing context, while the document was being loaded or by script executing after it was loaded. Each Subresource object also includes a reference to the cached Tracking Status Resource for the denoted domain (if it exists), and a Boolean indicating if the user agent had blocked the request. The “wasBlocked” Boolean will only be set when the user agent has blocked the resource for generic policy reasons, such as the domain has not been mentioned in the “same-party” or “other-party” properties of the script origin’s TSR. Only the first request to a domain is recorded, subsequent requests to the same or different resources with the same domain name are skipped. The user agent can generate SubresourceEvent events at any time, but would normally be no more than 5 seconds after a subresource has been requested. interface SubresourceEvent : Event { readonly attribute sequence Subresources; } interface Subresources { readonly attribute DOMString domain; // domain name component of the subresource URL readonly attribute DomString? parentDomain; // domain name component of parent browsing context’s origin readonly attribute TrackingStatusObject? TSR; // the object retuned from parsing the Tracking Status Resource, null if the TSR is not present, or invalid JSON readonly attribute Boolean? wasBlocked; // true if this subresource was blocked by the user agent, otherwise false, null or undefined } Subresources is an array of Subresource objects indicating all the subresources requested since the last SubresourceEvent event was generated. The rate at which SubresourceEvent events are generated is determined by the user agent. Only the first request to a domain is recorded, subsequent requests to the same or different resources with the same domain name are not recorded. Each Subresource object contains a string "domain" representing the domain name component of the subresource URL, a nullable string "parentDomain" representing the domain name of the parent origin of this subresource, a nullable object reference "TSR" resulting from parsing the JSON encoded Tracking Status Resource https://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html#status- resource of the subresource, and a boolean "wasBlocked" indicating whether the subresource was blocked by the user agent for reasons other than being on a user configurable blacklist. * "TSR" is null if a subresource does not have a Tracking Status Resource, or if it is not valid JSON. * "parentDomain" is null if the subresource is a child of the top level browsing context. * "wasBlocked" should only be set according to the user agents generic rules for protecting users' privacy, i.e. it cannot be used to obtain specific information about the existence of user configurable content blocking. This API notifies all subresources initiated by this browsing context, including those embedded in child subresources of the script origin.
Received on Saturday, 29 April 2017 11:34:11 UTC