Hype GlobalBehavior (master) doxdox documentation

This module allows to extend custom behavior across Hype document and iFrame boundaries containing Hype documents. There is also an implementation making this work across devices using Pusher. The function not listed in the JSDoc is the one mainly leveraged in this extension is hypeDocument.triggerCustomBehaviorNamed and is part of the official API. Hence the function is essential but not listed in the JSDocs of this extension.

# hypeDocument.startCustomBehaviorTicker(behavior, time, options, options.pattern, options.omitFirst)

Starts a custom behavior ticker. This is an interval based trigger that offers an optional tick pattern hypeDocument.startCustomBehaviorTicker('clockhand',1); hypeDocument.startCustomBehaviorTicker('ticktacktockwait', 0.5, {pattern: [true, true, true, false]});

Parameters

Name Types Description
behavior String This is the custom behavior name to we want to start the ticker for
time Number Object
options Object Some optional settings like pattern and omit first call
options.pattern Array This is an array containg an array with true or false to form a pettern
options.omitFirst Boolean I this is set to true the first call, directly fired when starting will be omitted

# hypeDocument.stopAllCustomBehaviorTicker(behavior)

Stops all custom behavior tickers across the current HTML document hypeDocument.stopCustomBehaviorTicker('clockhand');

Parameters

Name Types Description
behavior String This is the custom behavior name to we want to stop the ticker for

# hypeDocument.stopCustomBehaviorTicker(behavior)

Stops a custom behavior ticker. hypeDocument.stopCustomBehaviorTicker('clockhand');

Parameters

Name Types Description
behavior String This is the custom behavior name to we want to stop the ticker for

# HypeGlobalBehavior()