This module Provides animation detection and pseudo-listener functionality
Members
-
<inner> Animation
-
The animation object encapsulates all of the basic functionality that allows us to detect animation etc.
Methods
-
<private, inner> detectAnimationEndTime(node [, depth])
-
This function takes a node and determines the full end time of any transitions on it. Returns the time in milliseconds.
Parameters:
Name Type Argument Description node
HTMLElement The node to detect the transition time for.
depth
Number <optional>
How deep to test for transitions, defaults to null, which means no depth limitation
Returns:
The full transition time for the node, including delays, in milliseconds
- Type
- Number
-
<inner> addEndEventListener(node, listener [, depth])
-
Allows us to add an end event listener to the node.
Parameters:
Name Type Argument Description node
HTMLElement The element to attach the end event listener to
listener
function The function to run when the animation is finished. This allows us to construct an object to pass back through the promise chain of the parent.
depth
Number <optional>
How deep to test for transitions, defaults to null, which means no depth limitation
Returns:
-
A promise that represents the animation timeout.
- Type
- Promise
-
The resolve method. Passes the coerced variables (if any) from the listening object back to the chain.
- Type
- timerResolve
-
The reject method. Null.
- Type
- timerReject
-
Type Definitions
-
timerResolve(response, arguments, linkTarget)
-
The resolving object for the wtc-AnimationEvents.addEndEventListener
Parameters:
Name Type Description response
string The response from the AJAX call
arguments
array The arguments array originally passed to the AJAX.ajaxGet method
linkTarget
DOMElement The target element that fired the AJAX.ajaxGet