MCPcopy
hub / github.com/ampproject/amphtml / makeRequest

Method makeRequest

3p/iframe-messaging-client.js:73–77  ·  view source on GitHub ↗

* Make an event listening request. * * @param {string} requestType The type of the request message. * @param {string} responseType The type of the response message. * @param {function(JsonObject)} callback The callback function to call * when a message with type responseType is rece

(requestType, responseType, callback)

Source from the content-addressed store, hash-verified

71 * @return {function()}
72 */
73 makeRequest(requestType, responseType, callback) {
74 const unlisten = this.registerCallback(responseType, callback);
75 this.sendMessage(requestType);
76 return unlisten;
77 }
78
79 /**
80 * Make a one time event listening request.

Callers 6

observeIntersectionMethod · 0.80
constructorMethod · 0.80
listenForPosition_Method · 0.80

Calls 2

registerCallbackMethod · 0.95
sendMessageMethod · 0.95

Tested by

no test coverage detected