-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Describe the bug
While testing an integration in AMP environment, I encountered the issue of it not resizing the iframe. It turns out that the isSafeFrame check does not work for the forced SafeFrame by AMP.
The moment SafeFrame is being enabled in GAM, the detection works.
prebid-universal-creative/src/environment.js
Lines 26 to 28 in 907ca91
| export function isSafeFrame(win) { | |
| return !!(win.$sf && win.$sf.ext); | |
| } |
The only workaround seems to be to create dedicated line items and creatives for AMP, which has SafeFrame enabled in GAM.
It might make sense to always send the resize message for AMP, if there is no possibility without SafeFrame.
| if (isSafeFrame(window)) { |
To Reproduce
Steps to reproduce the behavior:
- AMP environment page
- Serve GAM creative with SafeFrame off
- Set breakpoint on
isSafeFrame, in amp.js - See it resulting in false and iframe src containing "safeframe" URL
Expected behavior
Outgoing AMP embed-siz message when the creative does not have SafeFrame checked.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status