Ads.
- Source:
Members
(static) adunits :nodelist
Cached list of all adunits
- Type:
- nodelist
- Source:
- Type:
- array
- Source:
- Type:
- array
- Source:
- Type:
- array
- Source:
- Source:
- Source:
- Source:
- Source:
- Type
- element
- Source:
- Source:
(static) fullscreens :array
Cached list of all fullscreen adunits
(static) scaleable :array
Cached list of all scaleable adunits
(static) stickies :array
Cached list of all sticky adunits
Methods
(static) init()
Initialize the component
(private, static) scale()
Scale all adunits to fit within given frame.
(static) setSize(message)
Sets size for adunit.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
message | object | Properties
|
Example:
window.parent.postMessage({ callback: 'db.libs.ads.size', size: 'large-980x300', frame: window.name }, 'http://dagbadet.no');
(static) setWallpaper(message) → {element}
Set wallpaper. This function can be given as a callback to postMessage
from within an iframe
to allow ads to set the a wallpaper ad.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message | object | Properties
|
Returns:
Example:
window.parent.postMessage({ callback: 'db.libs.ads.setWallpaper', src: 'http://…', url: 'http://…', frame: window.name }, 'http://dagbadet.no');
(private, static) updateFullscreen()
Updates visibility of fullscreen ads. This function is bound to window scroll event and throttled.
(private, static) updateSticky()
Updates poisition and state of sticky adunits. This function is bound to window scroll event and throttled.