Skip to content

Commit a517ac4

Browse files
authored
PBJS: document yield, legacyRender options (#6411)
1 parent 5729a13 commit a517ac4

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

dev-docs/publisher-api-reference/setConfig.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,18 @@ Alternatively you may delay execution of the entire command queue (not just auct
163163
pbjs.delayPrerendering = true;
164164
```
165165

166-
Note that `delayPrerendering` is a property of the `pbjs` global and not a normal setting; this is because it takes effect before (and delays) any call to `setConfig`.
166+
Note that `delayPrerendering` is a property of the `pbjs` global and not a normal setting; this is because it takes effect before (and delays) any call to `setConfig`.y
167+
168+
### Change yielding behavior
169+
170+
Since version 10, Prebid yields the main browser thread while processing its command queue (`pbjs.que` / `pbjs.cmd`). This makes the browser more responsive (faster [interaction to next paint](https://web.dev/articles/inp)), but can cause issues if your code expects to run synchronously.
171+
172+
You can disable yielding by setting `pbjs.yield = false` before loading Prebid (or - for NPM consumers - before running `processQueue`):
173+
174+
```javascript
175+
pbjs = pbjs || {};
176+
pbjs.yield = false;
177+
```
167178

168179
### Send All Bids
169180

@@ -1298,6 +1309,7 @@ The `auctionOptions` object controls aspects related to auctions.
12981309
| `secondaryBidders` | Optional | Array of Strings | Specifies bidders that the Prebid auction will no longer wait for before determining the auction has completed. This may be helpful if you find there are a number of low performing and/or high timeout bidders in your page's rotation. |
12991310
| `suppressStaleRender` | Optional | Boolean | When true, prevents `banner` bids from being rendered more than once. It should only be enabled after auto-refreshing is implemented correctly. Default is false. |
13001311
| `suppressExpiredRender` | Optional | Boolean | When true, prevent bids from being rendered if TTL is reached. Default is false.
1312+
| `legacyRender` | Optional | Boolean | When true, uses "legacy" rendering logic (see [note](#note-legacyRender)) |
13011313

13021314
#### Examples
13031315
{: .no_toc}
@@ -1356,6 +1368,15 @@ PBJS performs the following actions when expired rendering is detected.
13561368

13571369
Expired winning bids will continue to be rendered unless `suppressExpiredRender` is set to true. Events including `STALE_RENDER` and `BID_WON` are unaffected by this option.
13581370

1371+
<a id="note-legacyRender"></a>
1372+
1373+
#### More on `legacyRender`
1374+
{: .no_toc}
1375+
1376+
Since Prebid 10.12, `pbjs.renderAd` wraps creatives in an additional iframe. This can cause problems for some creatives
1377+
that try to reach the top window and do not expect to find the extra iframe. You may set `legacyRender: true` to revert
1378+
to pre-10.12 rendering logic.
1379+
13591380
<a name="setConfig-maxNestedIframes"></a>
13601381

13611382
### maxNestedIframes

0 commit comments

Comments
 (0)