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

Method getHtml

3p/ampcontext.js:192–201  ·  view source on GitHub ↗

* Requests HTML snippet from the parent window. * @param {string} selector CSS selector * @param {!Array } attributes permissible attributes to be kept * in the returned HTML string * @param {function(*)} callback to be invoked with the HTML string

(selector, attributes, callback)

Source from the content-addressed store, hash-verified

190 * @param {function(*)} callback to be invoked with the HTML string
191 */
192 getHtml(selector, attributes, callback) {
193 this.client_.getData(
194 MessageType_Enum.GET_HTML,
195 {
196 'selector': selector,
197 'attributes': attributes,
198 },
199 callback
200 );
201 }
202
203 /**
204 * Requests consent state from the parent window.

Callers 2

test-amp-ad-3p.jsFile · 0.80
_ping_Function · 0.80

Calls 1

getDataMethod · 0.80

Tested by

no test coverage detected