When the .populateItemDetail() hook lands in fast-list.js we can expose a higher level API to allow users of gaia-fast-list to provide an image for their list-item.
Will .populateItemDetail() support returning a Promise? I think this may be a requirement for Music. Unless we just run it and make a check that the item position hasn't changed when we get the image back.
How should we get a handle on the user provided <img>? We could possibly just .querySelector('img') once when the item is created and store the referece somewhere convenient. So long as we're not running .querySelector() every time we .render(), things should be good.
When the
.populateItemDetail()
hook lands in fast-list.js we can expose a higher level API to allow users of gaia-fast-list to provide an image for their list-item.Open questions:
.populateItemDetail()
support returning aPromise
? I think this may be a requirement for Music. Unless we just run it and make a check that the item position hasn't changed when we get the image back.<img>
? We could possibly just.querySelector('img')
once when the item is created and store the referece somewhere convenient. So long as we're not running.querySelector()
every time we.render()
, things should be good.