-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Conversation
926bc87
to
8c9b067
Compare
@dvoytenko PTAL |
5fb5d41
to
bdd6c23
Compare
/** @private {boolean} */ | ||
this.allowImgLoadFallback_ = false; | ||
|
||
// if this amp-img IS the fallback then don't allow it to have its own |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"if" -> "If"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
017fb6e
to
d9c9acb
Compare
@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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
d9c9acb
to
bdc6b5b
Compare
LGTM |
feature(amp-img): add amp-img fallback
Closes #2335