extensions/amp-ad-network-doubleclick-impl/0.1/test/test-amp-ad-network-doubleclick-impl.js
/**
 * Creates an iframe promise, and instantiates element and impl, adding the
 * former to the document of the iframe.
 * @param {{width, height, type}} config
 * @return The iframe promise.
 */
Creates an iframe promise, and instantiates element and impl, adding the
former to the document of the iframe.
@param {{width, height, type}} config
@return The iframe promise.
Creates an iframe promise and instantiates element and impl adding the former to the document of the iframe . @param {{ width height type }} config @return The iframe promise .
function createImplTag(config, element, impl, env) {
  config.type = 'doubleclick';
  element = createElementWithAttributes(env.win.document, 'amp-ad', config);
  element.setAttribute('data-a4a-upgrade-type',
      'amp-ad-network-doubleclick-impl');
  const iframe = env.win.document.createElement('iframe');
  element.appendChild(iframe);
  env.win.document.body.appendChild(element);
  impl = new AmpAdNetworkDoubleclickImpl(element);
  impl.iframe = iframe;
  return [element, impl, env];
}
function createImplTag ( config , element , impl , env ) { config . type = 'doubleclick' ; element = createElementWithAttributes ( env . win . document , 'amp-ad' , config ) ; element . setAttribute ( 'data-a4a-upgrade-type' , 'amp-ad-network-doubleclick-impl' ) ; const iframe = env . win . document . createElement ( 'iframe' ) ; element . appendChild ( iframe ) ; env . win . document . body . appendChild ( element ) ; impl = new AmpAdNetworkDoubleclickImpl ( element ) ; impl . iframe = iframe ; return [ element , impl , env ] ; }
Creates an iframe promise, and instantiates element and impl, adding the
 former to the document of the iframe.
Creates an iframe promise and instantiates element and impl adding the former to the document of the iframe .
// To trigger CSS styling. // Used to test styling which is targetted at first iframe child of // amp-ad.