Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes amp-analytics iframeTransport regression. #25917

Merged
merged 3 commits into from Dec 6, 2019

Conversation

lannka
Copy link
Contributor

@lannka lannka commented Dec 6, 2019

In the case of FIE rendering, the iframeTransport should be injected in the parent window instead of iframe window.

The regression was introduced here:
https://github.com/ampproject/amphtml/pull/25769/files#r354981761

…ndering, the iframeTransport should be injected in the parent window instead of iframe window.
@lannka lannka changed the title Add an example for botguard Fixes amp-analytics iframeTransport regression. Dec 6, 2019
// This behavior will be changed by ampdoc-fie launch.
// TODO: this will be a blocker to launch ampdoc-fie.
// We should find a different way to get the parent win in case of FIE.
this.getAmpDoc().win,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead use getTopWindow(this.win)? The getTopWindow is defined in the service.js.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we do in a separate PR as this PR will be cherry picked?
Or you think it's safe enough?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to move to a separate PR.

@lannka lannka merged commit 8ed5ddf into ampproject:master Dec 6, 2019
@lannka lannka deleted the add-botguard-example branch December 6, 2019 19:55
lannka added a commit that referenced this pull request Dec 6, 2019
* Add an example for botguard

* Fixes amp-analytics iframeTransport regression. In the case of FIE rendering, the iframeTransport should be injected in the parent window instead of iframe window.

* more comments
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
* Add an example for botguard

* Fixes amp-analytics iframeTransport regression. In the case of FIE rendering, the iframeTransport should be injected in the parent window instead of iframe window.

* more comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants