Whitelist amp-lightbox as part of an AMP ad
amp-lightbox is currently not allowed in an AMP ad. Here is a legitimate use case. https://joystick.app.box.com/s/oo42mzgbx8t6leohqfl4se98pvtcxzyp CC @ampproject/a4a
Can we whitelist it?
@dvoytenko / @tdrl do you recall if there was a reason we did not allow it to start? Do we expect it to behave properly when within a friendly frame?
amp-lightbox (and amp-image-lightbox) take over the whole viewport. This is what we want to do here as well?
In A4A we can do this. I'm pretty sure it doesn't currently fully work.
In 3p case, however, we need to establish some form of control. This would have to be done via messaging from the 3p iframe. We can't blankly allow all such requests from 3p. We have to ensure that request is sent on user action. This is similar how requestFullscreen API works. That being said, I think we can find a way to do this, we just need some research.
Btw, this is something we've been talking to browsers about. See https://github.com/whatwg/html/issues/1983 and https://bugs.chromium.org/p/chromium/issues/detail?id=621631
@dvoytenko, I do mean just whitelisting it for A4A. Any more detail on what's blocking there?
The full-screen overlay cannot escape the boundary of an iframe. So to make this work correctly in AMP, the whole iframe should be temporarily resized to take over the whole viewport. That by itself is ok, but we need to make sure the transition itself is not overly disruptive.
Closing this in preference of #2736.