Skip to content

amp-ad / onResizeDenied and onResizeSuccess not called anymore #4109

@RonanDrouglazet

Description

@RonanDrouglazet

Short description of your issue:

Hi AMP Team !

As we can see here https://github.com/ampproject/amphtml/tree/master/ads#ad-resizing
when an ad ask for a resize, they should get a response with onResizeDenied OR onResizeSuccess

It's not the case anymore since the July 14 Release (https://github.com/ampproject/amphtml/releases/tag/1468017284333)

How do we reproduce the issue?

You can reproduce here http://amp.teads.tv/test/resize.html

This sample only load a little js in our amp-ad component in place of our production framework

document.body.style.background = "orange"

window.context.onResizeDenied(function() {
    document.body.style.background = "red"
})

window.context.onResizeSuccess(function() {
    document.body.style.background = "green"
})

var askResize = function() {
    window.context.requestResize(window.innerWidth, 200)
    setTimeout(askResize, 1000)
}

askResize()

As you can see, the background color has to change if we received a response

Currently in the sample, the resize seems to be accepted because our component is "open" (we start to height=1)

What browsers are affected?

All browsers / devices

Which AMP version is affected?

Since 1468017284333

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions