renderTemplate( directionClass = 'none' ) {
			// Grab the selected value.
			const input = this.onboardingModal.querySelector(
				'input[type="checkbox"]'
			);
			if ( input ) {
				this.selection[ input.id ] = input.checked;
			}

			const template = WP_Smush.onboarding.template( 'smush-onboarding' );
			const content = template( this.settings );

			if ( content ) {
				this.contentContainer.innerHTML = content;

				if ( 'none' === directionClass ) {
					this.contentContainer.classList.add( 'loaded' );
				} else {
					this.contentContainer.classList.remove( 'loaded' );
					this.contentContainer.classList.add( directionClass );
					setTimeout( () => {
						this.contentContainer.classList.add( 'loaded' );
						this.contentContainer.classList.remove(
							directionClass
						);
					}, 600 );
				}
			}

			this.onboardingModal.addEventListener(
				'touchstart',
				this.handleTouchStart,
				false
			);
			this.onboardingModal.addEventListener(
				'touchmove',
				this.handleTouchMove,
				false
			);

			this.bindSubmit();
		}
/**
		 * Update the template, register new listeners.
		 *
		 * @param {string} directionClass  Accepts: fadeInRight, fadeInLeft, none.
		 */
Update the template, register new listeners.
@param {string} directionClass  Accepts: fadeInRight, fadeInLeft, none.
Update the template register new listeners . @param { string } directionClass Accepts : fadeInRight fadeInLeft none .
renderTemplate( directionClass = 'none' ) {
			const input = this.onboardingModal.querySelector(
				'input[type="checkbox"]'
			);
			if ( input ) {
				this.selection[ input.id ] = input.checked;
			}
			const template = WP_Smush.onboarding.template( 'smush-onboarding' );
			const content = template( this.settings );
			if ( content ) {
				this.contentContainer.innerHTML = content;
				if ( 'none' === directionClass ) {
					this.contentContainer.classList.add( 'loaded' );
				} else {
					this.contentContainer.classList.remove( 'loaded' );
					this.contentContainer.classList.add( directionClass );
					setTimeout( () => {
						this.contentContainer.classList.add( 'loaded' );
						this.contentContainer.classList.remove(
							directionClass
						);
					}, 600 );
				}
			}
			this.onboardingModal.addEventListener(
				'touchstart',
				this.handleTouchStart,
				false
			);
			this.onboardingModal.addEventListener(
				'touchmove',
				this.handleTouchMove,
				false
			);
			this.bindSubmit();
		}
renderTemplate ( directionClass = 'none' ) { const input = this . onboardingModal . querySelector ( 'input[type="checkbox"]' ) ; if ( input ) { this . selection [ input . id ] = input . checked ; } const template = WP_Smush . onboarding . template ( 'smush-onboarding' ) ; const content = template ( this . settings ) ; if ( content ) { this . contentContainer . innerHTML = content ; if ( 'none' === directionClass ) { this . contentContainer . classList . add ( 'loaded' ) ; } else { this . contentContainer . classList . remove ( 'loaded' ) ; this . contentContainer . classList . add ( directionClass ) ; setTimeout ( ( ) => { this . contentContainer . classList . add ( 'loaded' ) ; this . contentContainer . classList . remove ( directionClass ) ; } , 600 ) ; } } this . onboardingModal . addEventListener ( 'touchstart' , this . handleTouchStart , false ) ; this . onboardingModal . addEventListener ( 'touchmove' , this . handleTouchMove , false ) ; this . bindSubmit ( ) ; }
Update the template, register new listeners.
Update the template register new listeners .
// Grab the selected value.