Open marcoscaceres opened 6 years ago
"purpose" and "platform" are not applicable here, so unless this can be refactored, I don't think reusing ImageResource is appropriate.
IMHO, we should refactor if necessary.
"purpose" is a hint, so can be ignored.
It can't though. When you use a dictionary with a defined field, that field is always retrieved from the object, per Web IDL. An implementation doesn't have an option to just not follow Web IDL for things designated as hints.
Yes, but I don't see why they are not useful. Maybe in the future there will be a "purpose" for showing the payment handler icon in a specific way, which is the reason purpose exists. Some might also want a slightly change the icon depending on platform, ie. "android" vs "windows".
I don't think we should have specs do something because maybe in the future someone might use the thing they do.
As for whether browsers intend to allow customizing payment app icons per platform, that's a question for the spec editors, but given that they currently don't allow it, I'd assumed not. (Indeed, I'd prefer not to proliferate such incompatibilies between platforms when unnecessary.)
Ping @dbaron as this relates to some of his feedback: https://github.com/w3ctag/design-reviews/issues/231#issuecomment-379432134
The argument that purpose
and platform
shouldn't be present seems like a reasonable justification for having a different dictionary
. However, it's not clear to me whether that justifies having different definitions for the common members. Can the definitions of src
, sizes
, and type
(sizes
being the most interesting) just reference the definitions from ImageResource
?
(Otherwise, I think this has converged a bit since I last looked at it closely.)
We rewrote web manifest in terms of WebIDL, so it's now possible to reference
ImageResource
instead.We should reuse as much infrastructure from web manifest as we can, specially around fetching images.