-
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
✨Get placeholder background from placeholder
srcs
#20563
Conversation
if (element.hasAttribute(poster)) { | ||
return element.getAttribute(poster); | ||
} | ||
const imgEl = element.querySelector( |
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.
Is img[placeholder]
possible?
amp-img[placeholder], [placeholder] amp-img
may cover more cases in case they wrap it in a div for some reason.
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.
Added [placeholder] amp-img
.
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.
Lol, there used to be a TODO there to switch to amp-img, oh well. :)
skipForSlot('uses `placeholder` img', () => { | ||
const html = htmlFor(env.win.document); | ||
const el = html`<amp-video> | ||
<img src=foo.png placeholder> |
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.
ditto above, I didn't think this is valid.
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.
Not valid AMPHTML but generated by the runtime.
* commit '273e1fe2ff7719bf555c9614afe19e14231e4dae': Changes to make carousel v2 work with lightbox gallery. (ampproject#20558) ✅ Additional carousel v2 end to end tests (ampproject#20522) ✨Get placeholder background from `placeholder` srcs (ampproject#20563) 🐛Reparent placeholder to account for incorrect positioning (ampproject#20562) Fix amp-sidebar keyboard event forwarding (ampproject#20557) 📖 Update `amp-video-docking` CSS reference (ampproject#20571) ✅Validate `dock` for `amp-youtube` (ampproject#20554) ✅Validate `dock` for `amp-brightcove` (ampproject#20567) ✅Add overflow prevention test (ampproject#20546) ✅Fix amp-date-display flakes (ampproject#20568) temporarily disable saucelabs because of flakiness (ampproject#20566) Fix closing the page attachment through popping the history state. (ampproject#20443) ✨Add AMP layer to E2E tests (ampproject#20502) add avenues for CLA help (ampproject#20521) provide more details on design reviews (ampproject#20533) 🗑️ Remove `video-dock` experiment guard. (ampproject#20413) ♻️ amp-recaptcha-input: Allow passing the recaptcha API url from the frame (ampproject#20539) 🐛 Fix amp-list documentation (ampproject#20553) launch amp-list-viewport-resize to 75% in prod (ampproject#20552)
To account for the entire poster image API surface and cases where placeholder is dynamically set, e.g. `amp-youtube`.
To account for the entire
poster
image API surface and cases where placeholder is dynamically set, e.g.amp-youtube
.