diff --git a/index.html b/index.html index c5d87e4..e3ac020 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,9 @@
Copyright © 2023 the Contributors to “Topics API”. +
Copyright © 2024 the Contributors to “Topics API”. This document is licensed under the W3C Software License. @@ -1311,7 +1356,7 @@
options
= {});
+ [options
= {});
};
browsing-topics
feature.
document is not allowed to use the interest-cohort
feature.
The user preference setting disallows access to topics from topLevelDocument given document’s origin.
-Access to topics from topLevelDocument given document’s origin is disabled due to some other user agent-defined mechanism, like lack of enrollment.
-Note: In Chrome’s experimentation phase, it will additionally require a valid origin trial token to exist in document.
then:
Let topics be the result of running the calculate the topics for caller algorithm, with topicsCallerContext as input.
+Let topics be an empty list.
If options["skipObservation
"] is false:
If the user preference setting and other user agent-defined mechanisms like enrollment allow access to topics from topLevelDocument given document’s origin:
Run the collect page topics calculation input data algorithm with topLevelDocument as input.
+Set topics to the result of running the calculate the topics for caller algorithm, with topicsCallerContext as input.
Run the collect topics caller domain algorithm with topLevelDocument and topicsCallerContext’s caller domain as input.
+If options["skipObservation
"] is false:
Run the collect page topics calculation input data algorithm with topLevelDocument as input.
+Run the collect topics caller domain algorithm with topLevelDocument and topicsCallerContext’s caller domain as input.
+Queue a global task on the browsing topics task source given document’s relevant global object to perform the following steps:
@@ -1460,7 +1506,7 @@Set topicsCallerContext’s top level context domain to topLevelDocument’s origin's host's registrable domain.
+Set topicsCallerContext’s top level context domain to topLevelDocument’s origin's host's registrable domain.
Let unsafeMoment be the wall clock's unsafe current time.
If the user preference setting disallows access to topics from topLevelDocument given requestOrigin, or access to topics from topLevelDocument given requestOrigin is disabled due to some other user agent-defined mechanism, like lack of enrollment, then return.
+Let topics be an empty list.
Let topics be the result of running the calculate the topics for caller algorithm, with topicsCallerContext as input.
+Let numVersionsInEpochs be 0.
Let numVersionsInEpochs be the result of running the get the number of distinct versions in epochs algorithm, with topicsCallerContext as input.
+If the user preference setting and other user agent-defined mechanisms like enrollment allow access to topics from topLevelDocument given requestOrigin:
+Set topics to the result of running the calculate the topics for caller algorithm, with topicsCallerContext as input.
+Set numVersionsInEpochs to the result of running the get the number of distinct versions in epochs algorithm, with topicsCallerContext as input.
+Let versionsToTopics be an ordered map.
The various lengths being returned (that depends on the number of distinct versions) could leak which epochs the user had disabled topics or didn’t use the browser, if it coincided with the version change. But this leak is minor. The most common cases (i.e. returning same version topics, or no topics) will have the same length.
Observe-Browsing-Topics
` HTTP response headerThe `Observe-Browsing-Topics
` HTTP response header can be used to record a caller’s topics observation.
Let callerDomain be request’s current URL's origin's host's registrable domain.
+Let callerOrigin be request’s current URL's origin.
+If the user preference setting or other user agent-defined mechanisms like enrollment disallows access to topics from topLevelDocument given callerOrigin, then return.
+Let callerDomain be callerOrigin’s host's registrable domain.
Let list be response’s header list.