index.js
function createRemoveNodeHandler(el, fn) {
  return function (mutations, observer) {
    mutations.forEach(function (mutation) {
      if (_includes(mutation.removedNodes, el)) {
        fn();
        observer.disconnect();
      }
    });
  };
}
function createRemoveNodeHandler(el, fn) {
  return function (mutations, observer) {
    mutations.forEach(function (mutation) {
      if (_includes(mutation.removedNodes, el)) {
        fn();
        observer.disconnect();
      }
    });
  };
}
function createRemoveNodeHandler ( el , fn ) { return function ( mutations , observer ) { mutations . forEach ( function ( mutation ) { if ( _includes ( mutation . removedNodes , el ) ) { fn ( ) ; observer . disconnect ( ) ; } } ) ; } ; }
Create a remove node handler that runs fn and removes the observer.
@param {Element} el
@param {Function} fn
@returns {Function}
Create a remove node handler that runs fn and removes the observer .