Called in response to a requested update or a browser state change that may affect the toolbar item.
- macOS 10.12+
The window containing the clicked toolbar item.
A code block used to set the state of the toolbar item.
This method is called by the
set method or when Safari’s state changes in a way that may affect the toolbar item’s enabled or badge state. Your handler should decide whether the toolbar menu should be enabled and whether it should have any badge text, and then call the
validationblock to update the toolbar item state.