The id for the placement. For most placement types, this should be the id of a div that the ad will fill.
The options object containing settings for the placement.
Depending on loading state, this may return a promise or an object.
Disable ad refresh on current page, for debugging.
Generated using TypeDoc
Creates an ad placement.
The id used for a placement must be unique on the page it appears, and should be a stable identifier for the ad placement. Randomized values should not be used for id.
// basic usage window.nitroAds.createAd('banner-1', { sizes: [[728, 90]], });
// you can wrap with Promise.resolve to handle case where return may be a promise or not Promise.resolve(window.nitroAds.createAd('banner-1', {})).then((ad) => { // now save ad object for later use });
// you can also just use await in an async function let ad = await window.nitroAds.createAd('banner-1', {});