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

Method setAllowlist

src/service/action-impl.js:557–563  ·  view source on GitHub ↗

* Sets the action allowlist. Can be used to clear it. * @param {!Array<{tagOrTarget: string, method: string}>} allowlist

(allowlist)

Source from the content-addressed store, hash-verified

555 * @param {!Array<{tagOrTarget: string, method: string}>} allowlist
556 */
557 setAllowlist(allowlist) {
558 devAssert(
559 allowlist.every((v) => v.tagOrTarget && v.method),
560 'Action allowlist entries should be of shape { tagOrTarget: string, method: string }'
561 );
562 this.allowlist_ = allowlist;
563 }
564
565 /**
566 * Adds an action to the allowlist.

Callers 2

test-action.jsFile · 0.80
initializeListeners_Method · 0.80

Calls 1

devAssertFunction · 0.90

Tested by

no test coverage detected