Helper class for creating and rendering companion ads and firing beacons

Constructor

new (data:Dynamic, ?options:Dynamic)

Methods

data ():Dynamic

Gives specifics about the companion. See create for available properties.

fireClickBeacon ():Void

Send click beacons

fireViewBeacon ():Void

Send tracking beacons

height ():Int

Height of the companion

render (element:NativeViewElement):Void

Renders the companion to the DOM

Parameters:

element

The DOM element to attach the companion to

width ():Int

Width of the companion

Static methods

staticcreate (data:Dynamic, ?options:Dynamic):CompanionAd

Create a companion ad

Parameters:

data

Gives specifics about the companion. Available properties are:

  • height : Int - height of the companion
  • id : String - id of the companion
  • mimeType : String - mime type of the companion
  • resourceType : String - resource type of the companion
  • trackingUrls : Array<Dynamic> - tracking urls of the companion
  • url : String - url of the companion
  • width : Int - width of the companion

options

optional configuration data. Available values are:

  • wrap : Bool - true to wrap the companion in a clickable element

Returns:

the created companion