...
Code Block |
---|
With an anonymous function: SDG.Publisher.registerSlot('banner', document.getElementById('myBannerContainer')).load().nativeBackfill(function() { var ad = document.createElement('div'); ad.style.width = '728px'; ad.style.height = '90px'; ad.style.border = '1px solid'; ad.style.backgroundColor = 'red'; return ad; }).load(); With a declared function: function myAd(){ var ad = document.createElement('div'); ad.style.width = '728px'; ad.style.height = '90px'; ad.style.border = '1px solid'; ad.style.backgroundColor = 'red'; return ad; } SDG.Publisher.registerSlot('banner', document.getElementById('myBannerContainer')).loadnativeBackfill(myAd).nativeBackfillload(myAd); |
Guidelines for integrating advertising spaces
...