amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-state: JSON descendant and src attribute should not be mutually exclusive

Open kmh287 opened this issue 9 years ago • 3 comments

Now that we allow binding to [src] on amp-state components with or without the src attribute, we should probably remove the requirement that an amp-state has a JSON descendant or the src attribute, but not both.

/cc @choumx

kmh287 avatar Apr 19 '17 19:04 kmh287

@ericlindley-g mentioned that it would be nice to have inline JSON as a fallback for XHR failure case.

dreamofabear avatar May 16 '17 00:05 dreamofabear

/cc @sebastianbenz

ericlindley-g avatar May 16 '17 00:05 ericlindley-g

@choumx That's definitely one of the motivating use cases here. XHR would take precedence over JSON, allowing for unchanging or fallback data in the child JSON.

kmh287 avatar May 16 '17 12:05 kmh287