Skip to content

BannerAd.show ​

Display the banner ad. Call it after the BannerAd.onLoad() notification arrives.

Return Value ​

Promise<void>

The Promise only reflects the result of the show() call; it does not mean the ad has actually been displayed. Load or display failures are reported through BannerAd.onError(), and the actual display size through BannerAd.onResize(). A resolved Promise is not the same as a successful display.

Example Code ​

javascript
bannerAd.show()
    .then(() => {
        console.log('banner ad show call issued; waiting for onResize to report the actual size');
    })
    .catch((err) => {
        console.error('banner ad show call failed', err);
    })
    .finally(() => {
        console.log('banner ad show call finished');
    });