How to use the diffhtml/dist/cjs/transition.removeTransitionState function in diffhtml

To help you get started, we’ve selected a few diffhtml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tbranyen / diffhtml / packages / diffhtml-middleware-inline-transitions / dist / inline-transitions.js View on Github external
var unsubscribe = function unsubscribe() {
    // Unbind all the transition states.
    (0, _transition.removeTransitionState)('attributeChanged', attributeChanged);

    // Remove all elements from the internal cache.
    keys(transitionsMap).forEach(function (name) {
      var map = transitionsMap[name];
      var transitionName = eventsToTransitionName[name] || name;

      // Unbind the associated global handler.
      (0, _transition.removeTransitionState)(transitionName, boundHandlers.shift());

      // Empty the associated element set.
      map.clear();
    });

    // Empty the bound handlers.
    boundHandlers.length = 0;
  };