Fully deprecate the adloader.loadScript function #2780
Labels
Adapter API Change
Bidder Adapter API Change
good first issue
pinned
won't be closed by stalebot
Pub API Change
Publisher Facing API change
Type of issue
Feature
Description
As a follow-up to #2423, there are other areas in the Prebid.js core that still rely on the
adloader.js
's deprecatedloadScript
function. We should aim to update/refactor those areas in order to fully remove theloadScript
function.There is an alternate function currently implemented in the
adloader.js
file that's meant to replace theloadScript
function;loadExternalScript
. Note - theloadExternalScript
function is meant to be used in limited cases and only when approved by Prebid team.Below is a list of the currently known areas that still use the
loadScript
function:cookie.js
> thecookieSet
function uses theloadScript
function to call the specified file that's supplied in thes2sConfig.cookieSetUrl
object. Only theprebidServerBidAdapter
appears to use thecookieSet
function, so the impact is limited. From an initial analysis, we should be able to easily transfer to theloadExternalScript
function here.Renderer.js
> the main Renderer function usesloadScript
to load theRenderer.url
as well as handle the potentialRenderer.callback
field. This scenario will require additional changes to support; as theloadExternalScript
function does not currently handle callbacks like the originalloadScript
did.prebid.js
> the public$$PREBID_GLOBAL$$.loadScript
function. This code as well as any corresponding unit tests just needs to be removed .adaptermanager.js
> clean-up unit tests; specifically there are a number of stubs for theloadScript
function in the beforeEach/afterEach blocks. The corresponding main file doesn't appear to use theloadScript
function, so likely these are just remnants of previous code iterations that were forgotten.The text was updated successfully, but these errors were encountered: