VisitedLinkStore Class

The history of the visited links of a user, which the :visited pseudo-class matches against (https://drafts.csswg.org/selectors-4/#link): see BrowsingContextOptions.VisitedLinks. An implementation must be thread-safe when the store is shared by browsing contexts that run on several threads.

public abstract class VisitedLinkStore

Remarks

The entries are the triples of the partitioned history that Selectors describes (https://drafts.csswg.org/selectors-4/#visited-partitioning, "Example Privacy-Preserving :visited Restrictions"): a store decides how it uses the partition (see InMemoryVisitedLinkStore).

Constructors

NameDescription
VisitedLinkStore()

VisitedLinkStore()

protected VisitedLinkStore()

No documentation is available.

Properties

NameDescription
VersionGets a value that changes when the answers of VisitedLinkStore.IsVisited may have changed (e.g. a counter incremented when a link is added or when the history is cleared): the styles of the documents are computed again.

Version

Gets a value that changes when the answers of VisitedLinkStore.IsVisited may have changed (e.g. a counter incremented when a link is added or when the history is cleared): the styles of the documents are computed again.

public abstract long Version { get; }

Property value

long

Methods

NameDescription
Add(VisitedLink)Records a navigation of a browsing context that uses the store: the navigations to a document, the fragment navigations, and the URL changes of history.pushState() and history.replaceState(). A navigation is recorded for its destination (its URL, with the origin of the new document and the site of its top-level document, when the document is a top-level document or has the origin of its top-level document) and, when a document started it (a link, a form or a script), for that document (the same URL, with the origin of the document and the site of its top-level document).
IsVisited(VisitedLink)Returns whether a link of a document was visited.

Add(VisitedLink)

Records a navigation of a browsing context that uses the store: the navigations to a document, the fragment navigations, and the URL changes of history.pushState() and history.replaceState(). A navigation is recorded for its destination (its URL, with the origin of the new document and the site of its top-level document, when the document is a top-level document or has the origin of its top-level document) and, when a document started it (a link, a form or a script), for that document (the same URL, with the origin of the document and the site of its top-level document).

public abstract void Add(VisitedLink link)

Parameters

link VisitedLink
The URL of the navigation, and the document that observes it.

IsVisited(VisitedLink)

Returns whether a link of a document was visited.

public abstract bool IsVisited(VisitedLink link)

Parameters

link VisitedLink
The URL of the link, and the document that contains the link.

Returns

bool