zng_wgt_image

Function on_error

source
pub fn on_error(
    child: impl UiNode,
    handler: impl WidgetHandler<ImgErrorArgs>,
) -> impl UiNode
Expand description

P Image load or decode error event.

This property calls handler every time the CONTEXT_IMAGE_VAR updates with a different error or on the first update after init if the image is already in error on init.

§Handlers

This property accepts any WidgetHandler, including the async handlers. Use one of the handler macros, hn!, hn_once!, async_hn! or async_hn_once!, to declare a handler closure.

§Route

This property is not routed, it works only inside a widget that loads images. There is also no preview event.