Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isSafeFrame detection not detecting AMP forced SafeFrame #242

Open
Sir-Will opened this issue Oct 6, 2024 · 1 comment
Open

isSafeFrame detection not detecting AMP forced SafeFrame #242

Sir-Will opened this issue Oct 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Sir-Will
Copy link
Contributor

Sir-Will commented Oct 6, 2024

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.

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:

  1. AMP environment page
  2. Serve GAM creative with SafeFrame off
  3. Set breakpoint on isSafeFrame, in amp.js
  4. 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.

@patmmccann
Copy link

related: #107

the solution would close both i imagine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready for Dev
Development

No branches or pull requests

3 participants