Consolidate Dual render ad paths
Type of issue
Two areas of the code base can render an ad
https://github.com/prebid/Prebid.js/blob/880b089bf66701d19a6284a61847fb05a059b270/src/secureCreatives.js#L56 and https://github.com/prebid/Prebid.js/blob/2d14b7d53337c47b2e804f184927ed498990cc8f/src/prebid.js#L447
We've had various problems with these getting out of sync, including https://github.com/prebid/Prebid.js/issues/7702 and potentially recording analytics events eg bid_won.
It seems best if we consolidate them, potentially by removing the latter and always forcing the post message into an iframe with the creative in it.
I think the first path is for SafeFrames and the second is for non-safe frames. I'm not 100% sure one is compatible in the the environment of the other. I would agree with the desire to remove the "GLOBAL" path though.
It's unclear to me how we should deal with some of the differences:
- there is partial, awkward support for CLICKTHROUGH macro substitution (docs, also see this issue). It does not work, and with the current interface cannot work, on safeframe.
- there's hair-raising scraper-targeted markup generated only from
renderAd, again not from safeframes. - the new video module has some ad-hoc support only in renderAd. I think this might become a "normal" renderer (@karimMourra?)