miso
Copyright(C) 2016-2026 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Native.X.Element.Overlay.Event

Description

 
Synopsis

Events

onDismissOverlayWith :: (DOMRef -> action) -> Attribute model action Source #

Like onDismissOverlay, but the handler also receives the target element's DOMRef. Use for main-thread (MTS) handlers that imperatively mutate the element.

onDismissOverlayMain :: action -> EventHandler model action Source #

Like onDismissOverlay, but dispatched on the Lynx main thread (MTS).

Runs imperatively on the MTS (no VDOM diff). Meant to be used with -XStaticPointers.

data Action = Dismissed

view_ [ event (static (onDismissOverlayMain Dismissed)) ] [ "some view" ]

onDismissOverlayMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #

Like onDismissOverlayMain, but the handler also receives read-only access to the model and the target element's DOMRef (for imperative MTS mutation).

data Action = Dismissed Model DOMRef

view_ [ event (static (onDismissOverlayMainWith Dismissed)) ] [ "some view" ]

onError :: (OverlayErrorEvent -> action) -> Attribute model action Source #

https://lynxjs.org/api/elements/built-in/overlay.html#binderror

  • Android 2.18+*. Triggered on an overlay error.

onErrorWith :: (OverlayErrorEvent -> DOMRef -> action) -> Attribute model action Source #

Like onError, but the handler also receives the target element's DOMRef. Use for main-thread (MTS) handlers that imperatively mutate the element.

onErrorMain :: (OverlayErrorEvent -> action) -> EventHandler model action Source #

Like onError, but dispatched on the Lynx main thread (MTS).

Runs imperatively on the MTS (no VDOM diff). Meant to be used with -XStaticPointers.

data Action = Errored OverlayErrorEvent

view_ [ event (static (onErrorMain Errored)) ] [ "some view" ]

onErrorMainWith :: (OverlayErrorEvent -> model -> DOMRef -> action) -> EventHandler model action Source #

Like onErrorMain, but the handler also receives read-only access to the model and the target element's DOMRef (for imperative MTS mutation).

data Action = Errored OverlayErrorEvent Model DOMRef

view_ [ event (static (onErrorMainWith Errored)) ] [ "some view" ]

onOverlayTouchWith :: (OverlayTouchEvent -> DOMRef -> action) -> Attribute model action Source #

Like onOverlayTouch, but the handler also receives the target element's DOMRef. Use for main-thread (MTS) handlers that imperatively mutate the element.

onOverlayTouchMain :: (OverlayTouchEvent -> action) -> EventHandler model action Source #

Like onOverlayTouch, but dispatched on the Lynx main thread (MTS).

Runs imperatively on the MTS (no VDOM diff). Meant to be used with -XStaticPointers.

data Action = Touched OverlayTouchEvent

view_ [ event (static (onOverlayTouchMain Touched)) ] [ "some view" ]

onOverlayTouchMainWith :: (OverlayTouchEvent -> model -> DOMRef -> action) -> EventHandler model action Source #

Like onOverlayTouchMain, but the handler also receives read-only access to the model and the target element's DOMRef (for imperative MTS mutation).

data Action = Touched OverlayTouchEvent Model DOMRef

view_ [ event (static (onOverlayTouchMainWith Touched)) ] [ "some view" ]

onRequestClose :: action -> Attribute model action Source #

onRequestCloseWith :: (DOMRef -> action) -> Attribute model action Source #

Like onRequestClose, but the handler also receives the target element's DOMRef. Use for main-thread (MTS) handlers that imperatively mutate the element.

onRequestCloseMain :: action -> EventHandler model action Source #

Like onRequestClose, but dispatched on the Lynx main thread (MTS).

Runs imperatively on the MTS (no VDOM diff). Meant to be used with -XStaticPointers.

data Action = RequestedClose

view_ [ event (static (onRequestCloseMain RequestedClose)) ] [ "some view" ]

onRequestCloseMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #

Like onRequestCloseMain, but the handler also receives read-only access to the model and the target element's DOMRef (for imperative MTS mutation).

data Action = RequestedClose Model DOMRef

view_ [ event (static (onRequestCloseMainWith RequestedClose)) ] [ "some view" ]

onShowOverlay :: action -> Attribute model action Source #

onShowOverlayWith :: (DOMRef -> action) -> Attribute model action Source #

Like onShowOverlay, but the handler also receives the target element's DOMRef. Use for main-thread (MTS) handlers that imperatively mutate the element.

onShowOverlayMain :: action -> EventHandler model action Source #

Like onShowOverlay, but dispatched on the Lynx main thread (MTS).

Runs imperatively on the MTS (no VDOM diff). Meant to be used with -XStaticPointers.

data Action = Shown

view_ [ event (static (onShowOverlayMain Shown)) ] [ "some view" ]

onShowOverlayMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #

Like onShowOverlayMain, but the handler also receives read-only access to the model and the target element's DOMRef (for imperative MTS mutation).

data Action = Shown Model DOMRef

view_ [ event (static (onShowOverlayMainWith Shown)) ] [ "some view" ]

Types

data OverlayErrorEvent Source #

Payload of the binderror event.

Constructors

OverlayErrorEvent 

Fields

data OverlayTouchEvent Source #

Payload of the bindoverlaytouch event.

Constructors

OverlayTouchEvent 

Fields

Decoders

Event Map