Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Engadget workaround from google-ima shim (#36)
There was a workaround in the google-ima shim that applied only to www.engadget.com that set a current advert to be returned by AdEvent.getAd() and AdsManager.getCurrentAd(). When testing the website, I couldn't see that code-path being hit at all, so let's remove the workaround. Also, let's take care to return null instead of undefined as is specified[1]. In the future, we could expand this logic if necessary. I think setting the currentAd to new Ad() when the AdEvent.Type.LOADED event fires and back to null when AdEvent.Type.ALL_ADS_COMPLETED fires would make sense - but we would need to test that doesn't cause more website breakage first. 1 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdEvent#getAd
- Loading branch information