prebid-server
prebid-server copied to clipboard
Sample: fix prebid js loading bug on sample html page
There is a bug on sample html page:
prebid.js:12
Uncaught TypeError: Cannot read properties of null (reading 'appendChild')
at U (prebid.js:12:9881)
at $.processQueue (prebid.js:12:99684)
at prebid.js:631:11
This is caused by appendChild() method call (inside pbjs) on a DOM element that doesn't exist yet .
This can be fixed by simply by deferring javascript scripts loading, and that is what i did in this pr.