amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-ad error : cross-origin frame

Open coreybyrnes opened this issue 9 years ago • 1 comments

I had successfully built out a resizing amp ad (300x250) that used window.parent.context.requestResize(300,500);

It's no longer working because I'm now seeing cross-origin errors. Is there a new method for resizing the container from within an amp ad?

demo url: http://rev.cbsi.com/corey/test/amp/amp_demo_resize.html#development=1

coreybyrnes avatar Mar 03 '17 15:03 coreybyrnes

I may have just answered my own question after days of digging around. Adding the following to the tag seems to work: json='{"useSameDomainRenderingUntilDeprecated":1}'

Found it here: https://github.com/ampproject/amphtml/tree/master/ads#exceptions-to-available-apis-and-information

Looks like the fix is being worked on here: https://github.com/ampproject/amphtml/issues/6829

coreybyrnes avatar Mar 03 '17 15:03 coreybyrnes