Skip to content

Commit

Permalink
Add optional perBuyerTimeouts to auction config.
Browse files Browse the repository at this point in the history
Allows sellers to optionally restrict the runtime of bidder scripts, with a default of 100 ms and a hard-cap of 500 ms.

Fixes WICG#90
  • Loading branch information
caraitto authored Nov 4, 2021
1 parent eeb1313 commit 1cd48da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FLEDGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ const myAuctionConfig = {
'perBuyerSignals': {'www.example-dsp.com': {...},
'www.another-buyer.com': {...},
...},
'perBuyerTimeouts': {'www.example-dsp.com': 100,
'www.another-buyer.com': 200,
...},
};
const auctionResultPromise = navigator.runAdAuction(myAuctionConfig);
```
Expand All @@ -156,6 +159,8 @@ This will cause the browser to execute the appropriate bidding and auction logic

The returned `auctionResultPromise` object is _opaque_: it is not possible for any code on the publisher page to inspect the winning ad or otherwise learn about its contents, but it can be passed to a Fenced Frame for rendering. (The [Fenced Frame Opaque Source explainer](https://github.com/shivanigithub/fenced-frame/blob/master/OpaqueSrc.md) has initial thoughts about how this could be implemented.) If the auction produces no winning ad, the return value can also be null, although this non-opaque return value leaks one bit of information to the surrounding page. In this case, for example, the seller might choose to render a contextually-targeted ad.

Optionally, `perBuyerTimeouts` can be specified to restrict the runtime (in milliseconds) of particular buyer's bidding scripts. If no value is specificed for a particular buyer, a default timeout of 100 ms will be selected. Any `perBuyerTimeouts` higher than 500 ms will be clamped to 500 ms.


#### 2.2 Auction Participants

Expand Down

0 comments on commit 1cd48da

Please sign in to comment.