From 407d9de6d525c6de28d08e8dbfa10c7a98b977c6 Mon Sep 17 00:00:00 2001 From: florevallatmrf <32760132+florevallatmrf@users.noreply.github.com> Date: Thu, 9 Aug 2018 09:35:09 +0200 Subject: [PATCH] GLU-657/remove resize from securecreatives (#17) --- src/secureCreatives.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/secureCreatives.js b/src/secureCreatives.js index 424d1402831..f6a2cf9fed7 100644 --- a/src/secureCreatives.js +++ b/src/secureCreatives.js @@ -6,7 +6,6 @@ import events from './events'; import { fireNativeTrackers } from './native'; import { EVENTS } from './constants'; -import { isSlotMatchingAdUnitCode } from './utils'; import { auctionManager } from './auctionManager'; import find from 'core-js/library/fn/array/find'; @@ -56,7 +55,6 @@ function sendAdToCreative(adObject, remoteDomain, source) { const { adId, ad, adUrl, width, height } = adObject; if (adId) { - resizeRemoteCreative(adObject); source.postMessage(JSON.stringify({ message: 'Prebid Response', ad, @@ -67,12 +65,3 @@ function sendAdToCreative(adObject, remoteDomain, source) { }), remoteDomain); } } - -function resizeRemoteCreative({ adUnitCode, width, height }) { - const iframe = document.getElementById( - find(window.googletag.pubads().getSlots().filter(isSlotMatchingAdUnitCode(adUnitCode)), slot => slot) - .getSlotElementId()).querySelector('iframe'); - - iframe.width = '' + width; - iframe.height = '' + height; -}