overlay.registerOnCanOpen

API reference for the overlay.registerOnCanOpen method.

Registers a callback that runs when the canOpen state of an overlay target changes.

#optsobject
Required

Options for configuring the callback.

Properties of opts
#onCanOpenfunction
Required

A callback that runs when the canOpen state of the specified target changes.

This callback fires immediately.

Parameters

#eventOverlayOpenableEvent<Target>
Required

Information about whether or not an overlay can be opened for the specified target.

Returns

void

#targetTarget
Required

The target to check the canOpen state of.

This must be "image_selection".

() => void