cobbdb / harmony

Simplify your DFP business logic.
MIT License
25 stars 5 forks source link

Transition entire api to async #47

Open cobbdb opened 8 years ago

cobbdb commented 8 years ago

defineSlot() and load() will need callbacks. One option is to expose a promise:

harmony.defineSlot({..}).then(function (slot) {
    // do things with the slot.
});

... or with normal callbacks ...

harmony.defineSlot({..}, function (slot) {
    // do things with the slot.
});

The goal is to wrap the api inside of googletag.cmd for stability.

cobbdb commented 7 years ago

Would need to shim promise.. probably save that for a someday wishlist http://caniuse.com/#feat=promises