Manifest: Payment Handler spec defines IDL types very similar to manifest

Created on 7 Feb 2018  路  4Comments  路  Source: w3c/manifest

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

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 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.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frlinw picture frlinw  路  7Comments

sealabr picture sealabr  路  4Comments

marcoscaceres picture marcoscaceres  路  9Comments

MehrdadKhnzd picture MehrdadKhnzd  路  3Comments

aarongustafson picture aarongustafson  路  8Comments