src/toastify.js
function(toastElement) {
      // Hiding the element
      // toastElement.classList.remove("on");
      toastElement.className = toastElement.className.replace(" on", "");

      // Removing the element from DOM after transition end
      window.setTimeout(
        function() {
          // Remove the elemenf from the DOM
          toastElement.parentNode.removeChild(toastElement);

          // Calling the callback function
          this.options.callback.call(toastElement);

          // Repositioning the toasts again
          Toastify.reposition();
        }.bind(this),
        400
      ); // Binding `this` for function invocation
    }
function(toastElement) {
      // Hiding the element
      // toastElement.classList.remove("on");
      toastElement.className = toastElement.className.replace(" on", "");

      // Removing the element from DOM after transition end
      window.setTimeout(
        function() {
          // Remove the elemenf from the DOM
          toastElement.parentNode.removeChild(toastElement);

          // Calling the callback function
          this.options.callback.call(toastElement);

          // Repositioning the toasts again
          Toastify.reposition();
        }.bind(this),
        400
      ); // Binding `this` for function invocation
    }
function ( toastElement ) { // Hiding the element // toastElement.classList.remove("on"); toastElement . className = toastElement . className . replace ( " on" , "" ) ; // Removing the element from DOM after transition end window . setTimeout ( function ( ) { // Remove the elemenf from the DOM toastElement . parentNode . removeChild ( toastElement ) ; // Calling the callback function this . options . callback . call ( toastElement ) ; // Repositioning the toasts again Toastify . reposition ( ) ; } . bind ( this ) , 400 ) ; // Binding `this` for function invocation }
Removing the element from the DOM
Removing the element from the DOM