Safe renderer#6585
Conversation
✅ Deploy Preview for prebid-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| If both Safe Renderer and top window renderers are specified, the Safe Renderer takes precedence. You can also disable top window renderers through the top level configuration flag: | ||
|
|
||
| ```javascript | ||
| config.setConfig({ allowTopWindowRenderers: false }) |
There was a problem hiding this comment.
| config.setConfig({ allowTopWindowRenderers: false }) | |
| pbjs.setConfig({ allowTopWindowRenderers: false }) |
I assume this is what you meant?
| * Reference implementation for `bid.safeRenderer.url`. | ||
| * Prebid injects this script into the creative iframe and then calls `window.pbRenderInFrame(payload)`. | ||
| */ | ||
| window.pbRenderInFrame = function ({ mediaType, config, ...renderingData }) { |
There was a problem hiding this comment.
I find this a bit confusing, because you are partially destructuring here and then describe the params below, but leave out the config .
Is config missing from renderingData data? Or is config actually its own parameter? Or is it the safeRenderer parameter?
The renderer.js in the related pbjs PR states
The remote script must assign
window.pbRenderInFrameas a function.
payloadis{ config: safeRenderer.config, ...renderingData }:renderingDatacarries bid-oriented ields passed through the creative pipeline
that may matter to an external renderer—for examplead,adId,adUrl,vastXml,vastUrl,mediaType, sizes,instl.
payload.configmirrorssafeRenderer.configfrom that payload; before the creative runs, Core may populate it from a static
safeRenderer.config(e.g. set on the bid by the bidder adapter) or by calling the publisher’ssafeRenderer.getConfig(bidResponse)once at render preparation.
So I guess config = safeRenderer.config , but it should be stated below in the table
Adding new safe renderer to "Renderer" section
🏷 Type of documentation
📋 Checklist
prebid/Prebid.js#14756