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

Method onMessage_

src/video-iframe-integration.js:132–142  ·  view source on GitHub ↗

* @param {!JsonObject} data * @private

(data)

Source from the content-addressed store, hash-verified

130 * @private
131 */
132 onMessage_(data) {
133 const id = data['id'];
134 if (isFiniteNumber(id) && this.callbacks_[id]) {
135 this.handleResponse_(id, data['args']);
136 return;
137 }
138
139 if (data['event'] == 'method') {
140 this.maybeExecute_(data['method']);
141 }
142 }
143
144 /**
145 * @param {number} id

Callers 1

constructorMethod · 0.95

Calls 3

handleResponse_Method · 0.95
maybeExecute_Method · 0.95
isFiniteNumberFunction · 0.90

Tested by

no test coverage detected