Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is important to always use either the event adnginLoaderReady or the boolean adngin.adnginLoaderReady to safely call AdEngine. The two methods could be combined like shown in the following example:

Code Block
varfunction doSomething() {
  adngin.queue.push(function() {
    adngin.cmd.startAuction();
  });
}
if(window.adngin && window.adngin.adnginLoaderReady) { doSomething(); }
else { window.addEventListener('adnginLoaderReady', doSomething); }

...