From e6f9c9d8d3cb3953f7fe179891cceac75dcdea64 Mon Sep 17 00:00:00 2001 From: Matt Menke Date: Thu, 5 Oct 2023 16:09:50 -0400 Subject: [PATCH] Add clearOriginJoinedAdInterestGroup to spec.bs This adds the explainer changes from explainer PR #829 / issue #475 to the spec. --- spec.bs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/spec.bs b/spec.bs index e9ef60b5..7c7a86b7 100644 --- a/spec.bs +++ b/spec.bs @@ -449,6 +449,7 @@ To build an interest group permissions url given a [=origin=] |ownerO

Leaving Interest Groups

+

leaveAdInterestGroup

{{Window/navigator}}.{{Navigator/leaveAdInterestGroup()}} removes a user from a particular interest group. @@ -509,6 +510,49 @@ are: +

clearOriginJoinedAdInterestGroups

+{{Window/navigator}}.{{Navigator/clearOriginJoinedAdInterestGroups()}} removes a user from +[=interest groups=] with the current page's [=interest group/joining origin=]. + + + +[SecureContext] +partial interface Navigator { + Promise<undefined> clearOriginJoinedAdInterestGroups( + USVString owner, optional sequence<USVString> interestGroupsToKeep = []); +}; + + +
+ +The clearOriginJoinedAdInterestGroups(group) method steps +are: + +1. Let |frameOrigin| be [=this=]'s [=relevant settings object=]'s + [=environment settings object/origin=]. +1. [=Assert=] that |frameOrigin| is not an [=opaque origin=] and its [=origin/scheme=] is "`https`". +1. Let |p| be [=a new promise=]. +1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=allowed to use=] the + "[=join-ad-interest-group=]" [=policy-controlled feature=], then [=exception/throw=] a + "{{NotAllowedError}}" {{DOMException}}. + + Note: both joining and leaving interest groups use the "join-ad-interest-group" feature. +1. Let |owner| be the result of [=parsing an https origin=] with |owner|. +1. If |owner| is failure, [=exception/throw=] a {{TypeError}}. +1. Run these steps [=in parallel=]: + 1. Let |permission| be the result of [=checking interest group permissions=] with + |owner|, |frameOrigin|, and "`leave`". + 1. If |permission| is false, then [=queue a task=] to [=reject=] |p| with a + "{{NotAllowedError}}" {{DOMException}} and do not run the remaining steps. + 1. [=Queue a task=] to [=resolve=] |p| with `undefined`. + 1. [=list/Remove=] [=interest groups=] from the user agent's [=interest group set=] whose + [=interest group/owner=] is |owner|, [=interest group/joining origin=] is [=this=]'s + [=relevant settings object=]'s [=environment/top-level origin=], and + [=interest group/name=] is not in |interestGroupsToKeep|. +1. Return |p|. + +
+

Running Ad Auctions

When a website or someone working on behalf of the website (e.g. a supply side platform, SSP) wants