The Widget JavaScript API allow you to utilize specific functions and attributes available for the widget and the banner itself.

Please note

Methods and Properties should generally speaking be used within a BannerFlow EventListener to ensure that they are available.
 All Methods and Properties are available on BannerFlow.INIT.


When your banner is loaded on a website the widget will be an IFRAME in the banner. When the widget is loaded, an object called “BannerFlow” is accessible and will help you listen to various banner events and information.


BannerFlow.addEventListener(BannerFlow.INIT, function(){
    console.log("Everything is initiated")
BannerFlow.addEventListener(BannerFlow.START_ANIMATION, function(){
    console.log("Widget is now active in the banner timeline")


There's a set of pre-defined methods which either returns values or executes an event.
 Some of methods are also available as simple properties, see further down below.


BannerFlow.addEventListener(BannerFlow.RESIZE, function(){
    var w = BannerFlow.getWidth();
    var h = BannerFlow.getHeight();


Properties just returns a value


BannerFlow.addEventListener(BannerFlow.SETTINGS_CHANGED, function(){
    var element = document.getElementById("mydiv"); = BannerFlow.settings.textSize; = BannerFlow.settings.textColor;
Did this answer your question?