instance method Spah.DOM.Modifiers#add
Spah.DOM.Modifiers#add(module) → Boolean
-
module
(Object
) – The module to be registered. Expected to implement the module interface.
Registers a modifier module, which must be an object implementing the functions:
- responds(attributeName) Returns a boolean indicating whether or not this module will respond to the found attribute.
- up(element, state) Runs the modification forwards. Used when the associated assertion flips from false to true for if assertions and when the associated assertion flips from true to false for unless assertions.
- down(element, state) Runs the modification backwards. Called when the associated assertion flips from true to false for if assertions and when the associated assertion flips from false to true for unless assertions.