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

feature(amp-img): add amp-img fallback #2575

Merged
merged 1 commit into from
Mar 16, 2016

Conversation

erwinmombay
Copy link
Member

Closes #2335

@erwinmombay erwinmombay changed the title add amp-img fallback feature(amp-img): add amp-img fallback Mar 14, 2016
@erwinmombay erwinmombay force-pushed the fallback-img branch 2 times, most recently from 926bc87 to 8c9b067 Compare March 14, 2016 07:40
@erwinmombay
Copy link
Member Author

@dvoytenko PTAL

@erwinmombay erwinmombay force-pushed the fallback-img branch 8 times, most recently from 5fb5d41 to bdd6c23 Compare March 14, 2016 08:33
/** @private {boolean} */
this.allowImgLoadFallback_ = false;

// if this amp-img IS the fallback then don't allow it to have its own
Copy link
Contributor

Choose a reason for hiding this comment

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

"if" -> "If"

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@erwinmombay erwinmombay force-pushed the fallback-img branch 4 times, most recently from 017fb6e to d9c9acb Compare March 15, 2016 22:57
@erwinmombay
Copy link
Member Author

@dvoytenko PTAL

// Clean up the fallback if the src has changed.
if (!this.allowImgLoadFallback_ &&
this.img_.classList.contains('-amp-ghost')) {
this.img_.classList.remove('-amp-ghost');
Copy link
Contributor

Choose a reason for hiding this comment

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

vsync since we are out of phase here with a micro-task.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@dvoytenko
Copy link
Contributor

LGTM

erwinmombay added a commit that referenced this pull request Mar 16, 2016
feature(amp-img): add amp-img fallback
@erwinmombay erwinmombay merged commit 35af828 into ampproject:master Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants