Skip to main content

ShouldAddCallback

type ShouldAddCallback = (
uris: string[],
uids?: string[],
contextUri?: string
) => boolean;

Parameters

ParameterTypeDescription
urisstring[]List of URIs of the selected items.
uidsstring[] | undefinedList of UIDs of the selected items. Note: Not all context menu items have UIDs.
contextUristring | undefinedURI of the context menu where the item was called from. This could be a playlist, album, artist, or a track.

Return value

boolean - Whether the menu item should be added.