Skip to content

Commit

Permalink
Update spec.bs
Browse files Browse the repository at this point in the history
  • Loading branch information
MattMenke2 authored Feb 3, 2025
1 parent 49a3442 commit 75a2b72
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,8 @@ is a [=structured header=] whose value must be an [=structured header/integer=].

<div algorithm>
To <dfn>fetch trusted signals</dfn> given a [=URL=] |url|, an [=origin=] |scriptOrigin|, a
[=policy container=] |policyContainer|, and a [=boolean=] |isBiddingSignal|:
[=policy container=] |policyContainer|, and a [=boolean=] |isBiddingSignal|, and returning
a [=tuple=] (an [=ordered map=], [=ordered map=], [=Number=]):

1. Let |request| be a new [=request=] with the following properties:
: [=request/URL=]
Expand Down Expand Up @@ -2714,19 +2715,19 @@ To <dfn>fetch trusted signals</dfn> given a [=URL=] |url|, an [=origin=] |script
[:X-fledge-bidding-signals-format-version:] and "`item`" from |headers|.
1. Set |signals| to the result of [=parsing JSON bytes to an Infra value=] |responseBody|.
1. Wait for |signals| to be set.
1. If |signals| is a parsing exception, or if |signals| is not an [=ordered map=], return « null,
null, null ».
1. If |signals| is a parsing exception, or if |signals| is not an [=ordered map=], return a
[=tuple=] (null, null, null).
1. If |formatVersion| is 2:
1. If |signals|["`keys`"] does not [=map/exist=], return « null, null, null ».
1. If |signals|["`keys`"] does not [=map/exist=], [=tuple=] (null, null, null ).
1. Set |signals| to |signals|["`keys`"].
1. If |signals| is not an [=ordered map=], return « null, null, null ».
1. If |signals| is not an [=ordered map=], return a [=tuple=] (null, null, null).
1. If |signals|["`perInterestGroupData`"] [=map/exists=] and is an [=ordered map=]:
1. [=Assert=] |isBiddingSignal| is true.
1. Let |perInterestGroupData| be |signals|["`perInterestGroupData`"].
1. [=map/For each=] |key| → |value| of |signals|:
1. [=map/Set=] |signals|[|key|] to the result of [=serializing an Infra value to a JSON string=]
given |value|.
1. Return « |signals|, |perInterestGroupData|, |dataVersion| ».
1. Return a [=tuple=] (|signals|, |perInterestGroupData|, |dataVersion|).
</div>

<div algorithm>
Expand Down

0 comments on commit 75a2b72

Please sign in to comment.