Skip to content

Commit

Permalink
Added width and height to creative iframe (prebid#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaiminpanchal27 authored and mobfxoHB committed Aug 21, 2023
1 parent 2d374a4 commit 3d01fed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integrationExamples/gpt/amp/creative.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
document.write(data.ad);
document.close();
} else if (data.adUrl) {
document.write('<IFRAME SRC="' + data.adUrl + '" FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true"></IFRAME>');
document.write('<IFRAME SRC="' + data.adUrl + '" WIDTH="'+ data.width +'" HEIGHT="'+ data.height +'" FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true"></IFRAME>');
document.close();
}
}
Expand Down
7 changes: 6 additions & 1 deletion integrationExamples/gpt/amp/remote.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,16 @@

var ad = adObject.ad;
var adUrl = adObject.adUrl;
var width = adObject.width;
var height = adObject.height;
var message = JSON.stringify({
message: 'Prebid creative sent: ' + data.adId,
ad: ad,
adUrl: adUrl
adUrl: adUrl,
width: width,
height: height
});

ev.source.postMessage(message, '*');
}
}
Expand Down

0 comments on commit 3d01fed

Please sign in to comment.