Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • EventTypes: string | symbol

Hierarchy

  • EventEmitter
    • H5AdWrapper

Index

Properties

bannerActive

bannerActive: boolean = false

Private provider

provider: any = null

Static EventEmitter

EventEmitter: EventEmitterStatic

Static prefixed

prefixed: string | boolean

Methods

adAvailable

  • adAvailable(adType: AdType, ...args: any[]): boolean
  • Checks if ads are enabled or blocked

    Parameters

    • adType: AdType
    • Rest ...args: any[]

    Returns boolean

addListener

  • addListener(event: EventTypes, fn: ListenerFn, context?: any): this
  • Parameters

    • event: EventTypes
    • fn: ListenerFn
    • Optional context: any

    Returns this

adsEnabled

  • adsEnabled(): boolean

destroyAd

  • destroyAd(adType: AdType, ...args: any[]): void
  • Some providers require you to destroy an add after it was shown, that can be done here.

    Parameters

    • adType: AdType
    • Rest ...args: any[]

    Returns void

emit

  • emit(event: EventTypes, ...args: Array<any>): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: EventTypes
    • Rest ...args: Array<any>

    Returns boolean

eventNames

  • eventNames(): Array<EventTypes>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<EventTypes>

hideAd

  • hideAd(adType: AdType, ...args: any[]): void
  • Some providers allow you to hide an ad, you might think of an banner ad that is shown in show cases

    Parameters

    • adType: AdType
    • Rest ...args: any[]

    Returns void

listenerCount

  • listenerCount(event: EventTypes): number
  • Return the number of listeners listening to a given event.

    Parameters

    • event: EventTypes

    Returns number

listeners

  • listeners(event: EventTypes): Array<ListenerFn>
  • Return the listeners registered for a given event.

    Parameters

    • event: EventTypes

    Returns Array<ListenerFn>

off

  • off(event: EventTypes, fn?: EventEmitter.ListenerFn, context?: any, once?: undefined | false | true): this
  • Parameters

    • event: EventTypes
    • Optional fn: EventEmitter.ListenerFn
    • Optional context: any
    • Optional once: undefined | false | true

    Returns this

on

  • on(event: EventTypes, fn: ListenerFn, context?: any): this
  • Add a listener for a given event.

    Parameters

    • event: EventTypes
    • fn: ListenerFn
    • Optional context: any

    Returns this

once

  • once(event: EventTypes, fn: ListenerFn, context?: any): this
  • Add a one-time listener for a given event.

    Parameters

    • event: EventTypes
    • fn: ListenerFn
    • Optional context: any

    Returns this

preloadAd

  • preloadAd(adType: AdType, ...args: any[]): void
  • Some providers might require you to preload an ad before showing it, that can be done here

    Parameters

    • adType: AdType
    • Rest ...args: any[]

    Returns void

removeAllListeners

  • Remove all listeners, or those of the specified event.

    Parameters

    Returns this

removeListener

  • removeListener(event: EventTypes, fn?: EventEmitter.ListenerFn, context?: any, once?: undefined | false | true): this
  • Remove the listeners of a given event.

    Parameters

    • event: EventTypes
    • Optional fn: EventEmitter.ListenerFn
    • Optional context: any
    • Optional once: undefined | false | true

    Returns this

setAdProvider

  • setAdProvider(provider: any): void
  • Here we set an adprovider, any can be given as long as it implements the IProvider interface

    Parameters

    • provider: any

    Returns void

showAd

  • showAd(adType: AdType, ...args: any[]): void
  • Here we request an ad, the arguments passed depend on the provider used!

    Parameters

    • adType: AdType
    • Rest ...args: any[]

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc