src/component/intro/intro.js
function _exitIntro(targetElement, force) {
    var continueExit = true;

    // calling onbeforeexit callback
    //
    // If this callback return `false`, it would halt the process
    if (this._introBeforeExitCallback != undefined) {
        continueExit = this._introBeforeExitCallback.call(self);
    }

    // skip this check if `force` parameter is `true`
    // otherwise, if `onbeforeexit` returned `false`, don't exit the intro
    if (!force && continueExit === false) return;

    //remove overlay layers from the page
    var overlayLayers = targetElement.querySelectorAll('.introjs-overlay');

    if (overlayLayers && overlayLayers.length > 0) {
        for (var i = overlayLayers.length - 1; i >= 0; i--) {
            //for fade-out animation
            var overlayLayer = overlayLayers[i];
            overlayLayer.style.opacity = 0;
            setTimeout(
                function() {
                    if (this.parentNode) {
                        this.parentNode.removeChild(this);
                    }
                }.bind(overlayLayer),
                500
            );
        }
    }

    //remove all helper layers
    var helperLayer = targetElement.querySelector('.introjs-helperLayer');
    if (helperLayer) {
        helperLayer.parentNode.removeChild(helperLayer);
    }

    var referenceLayer = targetElement.querySelector('.introjs-tooltipReferenceLayer');
    if (referenceLayer) {
        referenceLayer.parentNode.removeChild(referenceLayer);
    }

    //remove disableInteractionLayer
    var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction');
    if (disableInteractionLayer) {
        disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);
    }

    //remove intro floating element
    var floatingElement = document.querySelector('.introjsFloatingElement');
    if (floatingElement) {
        floatingElement.parentNode.removeChild(floatingElement);
    }

    _removeShowElement();

    //remove `introjs-fixParent` class from the elements
    var fixParents = document.querySelectorAll('.introjs-fixParent');
    if (fixParents && fixParents.length > 0) {
        for (var i = fixParents.length - 1; i >= 0; i--) {
            fixParents[i].className = fixParents[i].className
                .replace(/introjs-fixParent/g, '')
                .replace(/^\s+|\s+$/g, '');
        }
    }

    //clean listeners
    if (window.removeEventListener) {
        window.removeEventListener('keydown', this._onKeyDown, true);
    } else if (document.detachEvent) {
        //IE
        document.detachEvent('onkeydown', this._onKeyDown);
    }

    //check if any callback is defined
    if (this._introExitCallback != undefined) {
        this._introExitCallback.call(self);
    }

    //set the step to zero
    this._currentStep = undefined;
}
function _exitIntro(targetElement, force) {
    var continueExit = true;

    // calling onbeforeexit callback
    //
    // If this callback return `false`, it would halt the process
    if (this._introBeforeExitCallback != undefined) {
        continueExit = this._introBeforeExitCallback.call(self);
    }

    // skip this check if `force` parameter is `true`
    // otherwise, if `onbeforeexit` returned `false`, don't exit the intro
    if (!force && continueExit === false) return;

    //remove overlay layers from the page
    var overlayLayers = targetElement.querySelectorAll('.introjs-overlay');

    if (overlayLayers && overlayLayers.length > 0) {
        for (var i = overlayLayers.length - 1; i >= 0; i--) {
            //for fade-out animation
            var overlayLayer = overlayLayers[i];
            overlayLayer.style.opacity = 0;
            setTimeout(
                function() {
                    if (this.parentNode) {
                        this.parentNode.removeChild(this);
                    }
                }.bind(overlayLayer),
                500
            );
        }
    }

    //remove all helper layers
    var helperLayer = targetElement.querySelector('.introjs-helperLayer');
    if (helperLayer) {
        helperLayer.parentNode.removeChild(helperLayer);
    }

    var referenceLayer = targetElement.querySelector('.introjs-tooltipReferenceLayer');
    if (referenceLayer) {
        referenceLayer.parentNode.removeChild(referenceLayer);
    }

    //remove disableInteractionLayer
    var disableInteractionLayer = targetElement.querySelector('.introjs-disableInteraction');
    if (disableInteractionLayer) {
        disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);
    }

    //remove intro floating element
    var floatingElement = document.querySelector('.introjsFloatingElement');
    if (floatingElement) {
        floatingElement.parentNode.removeChild(floatingElement);
    }

    _removeShowElement();

    //remove `introjs-fixParent` class from the elements
    var fixParents = document.querySelectorAll('.introjs-fixParent');
    if (fixParents && fixParents.length > 0) {
        for (var i = fixParents.length - 1; i >= 0; i--) {
            fixParents[i].className = fixParents[i].className
                .replace(/introjs-fixParent/g, '')
                .replace(/^\s+|\s+$/g, '');
        }
    }

    //clean listeners
    if (window.removeEventListener) {
        window.removeEventListener('keydown', this._onKeyDown, true);
    } else if (document.detachEvent) {
        //IE
        document.detachEvent('onkeydown', this._onKeyDown);
    }

    //check if any callback is defined
    if (this._introExitCallback != undefined) {
        this._introExitCallback.call(self);
    }

    //set the step to zero
    this._currentStep = undefined;
}
function _exitIntro ( targetElement , force ) { var continueExit = true ; // calling onbeforeexit callback // // If this callback return `false`, it would halt the process if ( this . _introBeforeExitCallback != undefined ) { continueExit = this . _introBeforeExitCallback . call ( self ) ; } // skip this check if `force` parameter is `true` // otherwise, if `onbeforeexit` returned `false`, don't exit the intro if ( ! force && continueExit === false ) return ; //remove overlay layers from the page var overlayLayers = targetElement . querySelectorAll ( '.introjs-overlay' ) ; if ( overlayLayers && overlayLayers . length > 0 ) { for ( var i = overlayLayers . length - 1 ; i >= 0 ; i -- ) { //for fade-out animation var overlayLayer = overlayLayers [ i ] ; overlayLayer . style . opacity = 0 ; setTimeout ( function ( ) { if ( this . parentNode ) { this . parentNode . removeChild ( this ) ; } } . bind ( overlayLayer ) , 500 ) ; } } //remove all helper layers var helperLayer = targetElement . querySelector ( '.introjs-helperLayer' ) ; if ( helperLayer ) { helperLayer . parentNode . removeChild ( helperLayer ) ; } var referenceLayer = targetElement . querySelector ( '.introjs-tooltipReferenceLayer' ) ; if ( referenceLayer ) { referenceLayer . parentNode . removeChild ( referenceLayer ) ; } //remove disableInteractionLayer var disableInteractionLayer = targetElement . querySelector ( '.introjs-disableInteraction' ) ; if ( disableInteractionLayer ) { disableInteractionLayer . parentNode . removeChild ( disableInteractionLayer ) ; } //remove intro floating element var floatingElement = document . querySelector ( '.introjsFloatingElement' ) ; if ( floatingElement ) { floatingElement . parentNode . removeChild ( floatingElement ) ; } _removeShowElement ( ) ; //remove `introjs-fixParent` class from the elements var fixParents = document . querySelectorAll ( '.introjs-fixParent' ) ; if ( fixParents && fixParents . length > 0 ) { for ( var i = fixParents . length - 1 ; i >= 0 ; i -- ) { fixParents [ i ] . className = fixParents [ i ] . className . replace ( / introjs-fixParent / g , '' ) . replace ( / ^\s+|\s+$ / g , '' ) ; } } //clean listeners if ( window . removeEventListener ) { window . removeEventListener ( 'keydown' , this . _onKeyDown , true ) ; } else if ( document . detachEvent ) { //IE document . detachEvent ( 'onkeydown' , this . _onKeyDown ) ; } //check if any callback is defined if ( this . _introExitCallback != undefined ) { this . _introExitCallback . call ( self ) ; } //set the step to zero this . _currentStep = undefined ; }
Exit from intro

@api private
@method _exitIntro
@param {Object} targetElement
@param {Boolean} force - Setting to `true` will skip the result of beforeExit callback
Exit from intro