You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨Add amp-iframe support for Pym.js width and height resize messages (#24917)
* Add amp-iframe support for Pym.js width and height resize messages
Fixes#22714.
Pym.js supports the client window sending several types of messages, including:
* `height`
* `width`
* `parentPositionInfo`
* `navigateTo`
* `scrollToChildPos`
The only two messages that seem relevant in an AMP context are width and height, as they map to the embed-size message that AMP is currently looking for.
* Use listen event-helper instead of addEventListner directly
* Rename unlisten_ to unlistenPym_
* Use this.win instead of window
* Indicate event param is non-nullable MessageEvent
* Use getData event helper
* Warn user about unsupported Pym.js messages
* Replace function binding with arrow function to fix JSC_TYPE_MISMATCH
* Add test for Pym.js messages for height and width
* Add missing tag argument to user().warn()
* Use startsWith string helper
* Replace array splice with direct references; fix format comment doc
* Add missing ID from Pym message
* Populate undefined variable sentinel
0 commit comments