Open rayankans opened 6 years ago
Excellent, this is exactly what I was looking for.
So IconDefinition
in background-fetch currently says it's derived from ImageResource
in manifest, but it's actually a bit different: in the last 2 members of the latter, in the types (DOMString
vs USVString
), and in the presence of "" defaults. In some ways it looks a lot like ImageObject
from payment-handler which is also missing the last 2 members.
I got here from w3ctag/design-reviews#279... and I'm also wondering if I'm now the TAG member who always says "hey, look, another way to specify icons". It would certainly be nice to sort this out at some point...
Background Fetch code uses ImageResource, the spec just needs to be updated. The plan is to replace IconDefinition with ImageResouce in the spec, which will support USVString instead. (Payment Handler code also uses ImageResource in some of its logic, i.e., icon selection. We should look into why we can't use it everywhere).
@dbaron
I'm also wondering if I'm now the TAG member who always says "hey, look, another way to specify icons". It would certainly be nice to sort this out at some point...
😀
Really appreciate the pointers here. I don't particularly want to maintain yet another icon definition.
@beverloo gonna pick this up. The UI bits are some of the last TODOs.
Use the ImageResource dictionary defined in the Web App Manifest spec (https://www.w3.org/TR/appmanifest/#imageresource-and-its-members) to pass the icons.