InMemoryVisitedLinkStore Class
A VisitedLinkStore that keeps the visited links in memory. It is thread-safe, and can be shared by several browsing contexts.
public sealed class InMemoryVisitedLinkStore : VisitedLinkStore- Inheritance
VisitedLinkStoreInMemoryVisitedLinkStore
Constructors
| Name | Description |
|---|---|
| InMemoryVisitedLinkStore() | Initializes a new instance of the InMemoryVisitedLinkStore class, partitioned by the origin of the document of the link and by the site of its top-level document. |
| InMemoryVisitedLinkStore(bool) | Initializes a new instance of the InMemoryVisitedLinkStore class. |
InMemoryVisitedLinkStore overloads
InMemoryVisitedLinkStore()
VisitedLinkStore.csInitializes a new instance of the InMemoryVisitedLinkStore class, partitioned by the origin of the document of the link and by the site of its top-level document.
public InMemoryVisitedLinkStore()InMemoryVisitedLinkStore(bool)
VisitedLinkStore.csInitializes a new instance of the InMemoryVisitedLinkStore class.
public InMemoryVisitedLinkStore(bool partitioned)Parameters
partitionedbool- Whether a link is only visited in the documents that could observe its navigation: the documents of the same origin, in a top-level document of the same site (https://drafts.csswg.org/selectors-4/#visited-partitioning). When false, the URL alone is the key: a visited link is visited in every document.
Properties
| Name | Description |
|---|---|
| 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. |
Version
VisitedLinkStore.csGets 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 override long Version { get; }Property value
Methods
| Name | Description |
|---|---|
| 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). |
| Clear() | Removes all the visited links. |
| IsVisited(VisitedLink) | Returns whether a link of a document was visited. |
Add(VisitedLink)
VisitedLinkStore.csRecords 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 override void Add(VisitedLink link)Parameters
linkVisitedLink- The URL of the navigation, and the document that observes it.
Clear()
VisitedLinkStore.csRemoves all the visited links.
public void Clear()IsVisited(VisitedLink)
VisitedLinkStore.csReturns whether a link of a document was visited.
public override bool IsVisited(VisitedLink link)