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

Expose richer visibility APIs to AMP ads. #1848

Merged

Conversation

cramforce
Copy link
Member

Fixes #1838
Fixes #1826

@@ -268,6 +268,9 @@ export function installAd(win) {
this.iframe_.style.visibility = '';
this.sendEmbedInfo_(this.isInViewport());
}, /* opt_is3P */ true);
viewerFor(this.getWin()).onVisibilityChanged(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

make this

this.viewer_ = viewerFor(this.getWin()); (or a local const)

Copy link
Member Author

Choose a reason for hiding this comment

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

Not generally necessary, but since there were now 3 of these in the file I cleaned it up.

@camelburrito
Copy link
Contributor

LG except for a nit.

@cramforce cramforce force-pushed the invisibility-and-viewability branch from b0ec7de to 1ac78de Compare February 8, 2016 23:01
cramforce added a commit that referenced this pull request Feb 8, 2016
Expose richer visibility APIs to AMP ads.
@cramforce cramforce merged commit deb56a7 into ampproject:master Feb 8, 2016
@cramforce cramforce deleted the invisibility-and-viewability branch February 8, 2016 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants