WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

Loader::maybe_output_preload_link_tag() public WC 1.0

Render a preload link tag for a dependency, optionally checked against a provided allowlist.

See: https://macarthur.me/posts/preloading-javascript-in-wordpress

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

No Hooks.

Return

null. Nothing.

Usage

$result = Loader::maybe_output_preload_link_tag( $dependency, $type, $allowlist );
$dependency(WP_Dependency) (required)
The WP_Dependency being preloaded.
$type(string) (required)
Dependency type - 'script' or 'style'.
$allowlist(array)
List of allowed dependency handles.

Code of Loader::maybe_output_preload_link_tag() WC 5.3.0

<?php
public static function maybe_output_preload_link_tag( $dependency, $type, $allowlist = array() ) {
	if ( ! empty( $allowlist ) && ! in_array( $dependency->handle, $allowlist, true ) ) {
		return;
	}

	$source = $dependency->ver ? add_query_arg( 'ver', $dependency->ver, $dependency->src ) : $dependency->src;

	echo '<link rel="preload" href="', esc_url( $source ), '" as="', esc_attr( $type ), '" />', "\n";
}