Skip to content

Commit

Permalink
Merge pull request #126 from MailOnline/next-release
Browse files Browse the repository at this point in the history
docs: ✏️ better document hooks
  • Loading branch information
carpasse authored Dec 24, 2018
2 parents 89a4925 + 150986e commit 0759e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runner/runWaterfall.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const waterfall = async (fetchVastChain, placeholder, options, isCanceled) => {
* Defaults to `true`.
* @param {Object} [options.hooks] - Optional map with hooks to configure the behaviour of the ad.
* @param {Function} [options.hooks.createSkipControl] - If provided it will be called to generate the skip control. Must return a clickable [HTMLElement](https://developer.mozilla.org/es/docs/Web/API/HTMLElement) that is detached from the DOM.
* @param {Function} [options.hooks.validateVastResponse] - If provided it will be called for each valid vast response. Must throw if there is a problem with the vast response. If the Error instance has an `errorCode` number then it will be tracked using the error macros in the Vast response. It will also call {@link runWaterfall~onError} with the thrown error.
* @param {Function} [options.hooks.validateVastResponse] - If provided it will be called for each valid vast response. Must throw if there is a problem with the vast response. If the Error instance has an `code` number then it will be tracked using the error macros in the Vast response. It will also call {@link runWaterfall~onError} with the thrown error.
* @param {Function} [options.hooks.transformVastResponse] - If provided it will be called before building the adUnit allowing the modification of the vastResponse if needed.
* @returns {Function} - Cancel function. If called it will cancel the ad run. {@link runWaterfall~onRunFinish} will still be called;
*/
Expand Down

0 comments on commit 0759e92

Please sign in to comment.