WordPress at a glance
function is not described

WP_Customize_Manager::doing_ajax() public WP 3.4.0

Return true if it's an Ajax request.

{} It's a method of the class: WP_Customize_Manager{}

No Hooks.

Return

true|false. True if it's an Ajax request, false otherwise.

Usage

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->doing_ajax( $action );
$action(string|null)
Whether the supplied Ajax action is being run.

Changelog

Since 3.4.0 Introduced.
Since 4.2.0 Added $action param.

Code of WP_Customize_Manager::doing_ajax() WP 5.7.2

<?php
public function doing_ajax( $action = null ) {
	if ( ! wp_doing_ajax() ) {
		return false;
	}

	if ( ! $action ) {
		return true;
	} else {
		/*
		 * Note: we can't just use doing_action( "wp_ajax_{$action}" ) because we need
		 * to check before admin-ajax.php gets to that point.
		 */
		return isset( $_REQUEST['action'] ) && wp_unslash( $_REQUEST['action'] ) === $action;
	}
}