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; -}