A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/dnt/issues/13 below:

doNotTrack property should be derived from EventTarget · Issue #13 · w3c/dnt · GitHub

Following on from the last issue about returning a Promise, for consistency it would make sense to do the same for the doNotTrack property. Its value cannot be calculated simply before the document is loaded as it may change as a result of user action or calls to the API. Code that uses the API is likely to need to be notified when doNotTrack changes, and having to do it inside a setInterval call back is annoying.

rather than making it simply a DOMString we could derive it from EventTarget, so code could do things like:

navigator.doNotTrack.addEventListener( "consent", function(dnt){
// doNotTrack has changed, - read and act on it now!
// dnt=="1" means DNT header will be "1" in any requests to this origin

WebIDL

partial interface Navigator {
readonly attribute DoNotTrack doNotTrack;
};

interface DoNotTrack: EventTarget {
DOMString? val;
}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3