ie.
Manifest: https://www.w3.org/TR/appmanifest/#imageresource-and-its-members
dictionary ImageResource {
required USVString src;
DOMString sizes;
USVString type;
USVString purpose;
USVString platform;
};
Payment Handler: https://w3c.github.io/payment-handler/#dom-imageobject
dictionary ImageObject {
required USVString src;
DOMString sizes;
DOMString type;
};
Unfortunately they are also slightly different, ie the use of USVString vs DOMString
Yeah, we need to get Payment Handler to use our definitions... working on this. The problem is that the manifest format might not work well for the API... basically the enum issue we identified earlier (it might not affect us here, but might bite us elsewhere!).
We need to sort all that out. We also need to define how to fetch an image without passing in the manifest.
cc'in @agektmr, as he mentioned this issue in #233 and might find this discussion interesting.
To be clear, we need to generalize the algorithms or we need to find other specs that handle this kind of thing already (e.g., web notifications handles ImageResource type things). We need to bring all those pieces together, so we don't have duplicates "this is an image" and "this is how you fetch it" in lots of different places in the platform.
The current situation is not ideal.
I totally agree.
Closing as there is no action here... will follow up on the Payment Handler side.
Most helpful comment
To be clear, we need to generalize the algorithms or we need to find other specs that handle this kind of thing already (e.g., web notifications handles
ImageResourcetype things). We need to bring all those pieces together, so we don't have duplicates "this is an image" and "this is how you fetch it" in lots of different places in the platform.The current situation is not ideal.