Module for displaying native ads
- Source:
Properties:
Name | Type | Description |
---|---|---|
selectors |
object | HTML element selectors |
adUnitCss |
string | css class name of an ad unit div |
adContainerCss |
string | css class name of an ad container div |
templates |
object | native ad templates |
Methods
(inner) collapseAd()
- Source:
Collapse an empty ad div or fallback to outbrian widget or branded content native ad
(inner) display(templateId, data, frame)
- Source:
Inject a native ad into designated slot
Parameters:
Name | Type | Description |
---|---|---|
templateId |
string | ID of a template |
data |
object | key value pair of data used to populate template |
frame |
element | DOM element of an ad |
(inner) generateAd(templateId, data)
- Source:
Generate a native ad node with template markup
Parameters:
Name | Type | Description |
---|---|---|
templateId |
string | ID of a template |
data |
object | key value pair for populating an ad template |
(inner) init()
- Source:
Make display functions available for access globally
(inner) otfAdLoaded()
- Source:
Populate native ad with data returned from ad server as gnca-sponsored-featured-content input field
(inner) setup($ad)
- Source:
Set up ad load listener.
Parameters:
Name | Type | Description |
---|---|---|
$ad |
HTMLElement | DOM element for the ad div |