Skip to content

Safe renderer#6585

Merged
muuki88 merged 5 commits into
masterfrom
mkomorski/safe-renderer
Jun 16, 2026
Merged

Safe renderer#6585
muuki88 merged 5 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

netlify Bot commented May 28, 2026

Copy link
Copy Markdown

Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit 3a991ae
🔍 Latest deploy log https://app.netlify.com/projects/prebid-docs-preview/deploys/6a26b0d19eaf210008f2cde1
😎 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 Outdated
Comment thread dev-docs/renderer.md Outdated
* 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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes, this object comes from safeRenderer.config - publishers can provide it by defining safeRenderer.getConfig(bidResponse)

@mkomorski mkomorski Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

destructuring mediaType from renderingData may be misleading here. Could be just ({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.

Sounds good. Will you make the change 😊 ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sure, changed

@mkomorski mkomorski requested a review from muuki88 June 16, 2026 08:40
@muuki88 muuki88 merged commit 5d3c891 into master Jun 16, 2026
6 checks passed
@muuki88 muuki88 deleted the mkomorski/safe-renderer branch June 16, 2026 14:43
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