In amp-ad iframe context, I can not capture orientationchange
or resize
event.
// Don't work because `window` object in iframe context.
window.addEventListener("resize", function() { console.info("resize") });
window.addEventListener("orientationchange", function { console.info("orientationchange") } );
Is there a way to detect orientationchange
or resize
event?