Skip to content

Safe renderer#6585

Open
mkomorski wants to merge 2 commits into
masterfrom
mkomorski/safe-renderer
Open

Safe renderer#6585
mkomorski wants to merge 2 commits into
masterfrom
mkomorski/safe-renderer

Conversation

@mkomorski
Copy link
Copy Markdown
Collaborator

Adding new safe renderer to "Renderer" section

🏷 Type of documentation

  • new bid adapter
  • update bid adapter
  • new feature
  • text edit only (wording, typos)
  • bugfix (code examples)
  • new examples

📋 Checklist

  • Related pull requests in prebid.js or server are linked -> Paste link in this list or reference it on the PR itself
  • For new adapters check submitting your adapter docs

prebid/Prebid.js#14756

@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit 38f8d4a
🔍 Latest deploy log https://app.netlify.com/projects/prebid-docs-preview/deploys/6a181298280f0e000887328d
😎 Deploy Preview https://deploy-preview-6585--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread dev-docs/renderer.md
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 })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config.setConfig({ allowTopWindowRenderers: false })
pbjs.setConfig({ allowTopWindowRenderers: false })

I assume this is what you meant?

Comment thread dev-docs/renderer.md
* 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 }) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.pbRenderInFrame as a function.
payload is { config: safeRenderer.config, ...renderingData }: renderingData carries bid-oriented ields passed through the creative pipeline
that may matter to an external renderer—for example ad, adId, adUrl, vastXml, vastUrl, mediaType, sizes, instl.
payload.config mirrors safeRenderer.config from 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’s safeRenderer.getConfig(bidResponse) once at render preparation.

So I guess config = safeRenderer.config , but it should be stated below in the table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants