MCPcopy Create free account
hub / github.com/ampproject/amphtml / onResponse

Method onResponse

third_party/subscriptions-project/swg.js:18072–18082  ·  view source on GitHub ↗

* @param {function(!Promise<!PaymentData>)} callback

(callback)

Source from the content-addressed store, hash-verified

18070 * @param {function(!Promise<!PaymentData>)} callback
18071 */
18072 onResponse(callback) {
18073 this.responseCallback_ = callback;
18074 const response = this.response_;
18075 if (response) {
18076 Promise.resolve().then(() => {
18077 if (response) {
18078 callback(this.convertResponse_(response, this.request_));
18079 }
18080 });
18081 }
18082 }
18083
18084 /**
18085 * @param {!Promise<!PaymentData>} responsePromise

Callers 1

configurePendingMethod · 0.80

Calls 4

convertResponse_Method · 0.95
resolveMethod · 0.80
callbackFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected