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

Function addUnsafeAllowAutoplay

src/iframe-video.js:131–135  ·  view source on GitHub ↗
(iframe)

Source from the content-addressed store, hash-verified

129 * @param {Element} iframe
130 */
131export function addUnsafeAllowAutoplay(iframe) {
132 let val = iframe.getAttribute('allow') || '';
133 val += 'autoplay;';
134 iframe.setAttribute('allow', val);
135}
136
137/**
138 * @param {?HTMLIFrameElement=} iframe

Callers 5

layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90
layoutCallbackMethod · 0.90

Calls 2

getAttributeMethod · 0.80
setAttributeMethod · 0.45

Tested by

no test coverage detected