From 153e432344527f089e3fd85c477fcb3906f86026 Mon Sep 17 00:00:00 2001 From: Josh Karlin Date: Wed, 3 Jan 2024 14:59:36 +0000 Subject: [PATCH] Merge pull request #276 from patcg-individual-drafts/yao-return-empty-topics-on-user-setting-failure SHA: 73f85fa89a9d1347c5ce477295e3ad79c8afb40d Reason: push, by jkarlin Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 1753 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 1125 insertions(+), 628 deletions(-) diff --git a/index.html b/index.html index c5d87e4..e3ac020 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,9 @@ Topics API - + - + - + - + -

Topics API

-

Unofficial Proposal Draft,

+

Unofficial Proposal Draft,

More details about this document
@@ -695,7 +740,7 @@

Topics API

-

partial interface Document { - [SecureContext] Promise<sequence<BrowsingTopic>> browsingTopics(optional BrowsingTopicsOptions options = {}); + [SecureContext] Promise<sequence<BrowsingTopic>> browsingTopics(optional BrowsingTopicsOptions options = {}); };
@@ -1346,12 +1391,7 @@

document is not allowed to use the 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:

    1. @@ -1363,14 +1403,20 @@

      Run the following steps in parallel:

      1. -

        Let topics be the result of running the calculate the topics for caller algorithm, with topicsCallerContext as input.

        +

        Let topics be an empty list.

      2. -

        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:

        1. -

          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.

        2. -

          Run the collect topics caller domain algorithm with topLevelDocument and topicsCallerContext’s caller domain as input.

          +

          If options["skipObservation"] is false:

          +
            +
          1. +

            Run the collect page topics calculation input data algorithm with topLevelDocument as input.

            +
          2. +

            Run the collect topics caller domain algorithm with topLevelDocument and topicsCallerContext’s caller domain as input.

            +
      3. 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 @@

  • -
    In Chrome’s experimentation phase, it will additionally require a valid origin trial token to exist in initiatorWindow’s associated document for the request to be eligible for topics.

    15.9. The `Observe-Browsing-Topics` HTTP response header

    The `Observe-Browsing-Topics` HTTP response header can be used to record a caller’s topics observation.

    @@ -1596,7 +1647,11 @@