.on()
ad.on(events)
ad.on(events)Attach an event handler function for one or more events to the ad.
ad.on("render", function() {
//run when the ad renders
});
Arguments
| Arugment | Value | Example Value | Description |
|---|---|---|---|
events | string | render | One or more space-separated event types and optional namespaces, such as "click" or "alter:adVisible" |
callback | function | function() ({ //callback code to run }); | A function to execute at the time the event is triggered. |
Updated less than a minute ago
