| Copyright | (C) 2016-2026 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Native.X.Element.ScrollCoordinator.Event
Description
Synopsis
- onOffset :: (ScrollCoordinatorOffsetEvent -> action) -> Attribute model action
- onOffsetWith :: (ScrollCoordinatorOffsetEvent -> DOMRef -> action) -> Attribute model action
- onOffsetMain :: (ScrollCoordinatorOffsetEvent -> action) -> EventHandler model action
- onOffsetMainWith :: (ScrollCoordinatorOffsetEvent -> model -> DOMRef -> action) -> EventHandler model action
- data ScrollCoordinatorOffsetEvent = ScrollCoordinatorOffsetEvent {}
- offsetDecoder :: Decoder ScrollCoordinatorOffsetEvent
- scrollCoordinatorEvents :: Events
Events
onOffset :: (ScrollCoordinatorOffsetEvent -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/scroll-coordinator.html#bindoffset
Callback reporting folding progress.
onOffsetWith :: (ScrollCoordinatorOffsetEvent -> DOMRef -> action) -> Attribute model action Source #
onOffsetMain :: (ScrollCoordinatorOffsetEvent -> action) -> EventHandler model action Source #
Like onOffset, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Offset ScrollCoordinatorOffsetEvent view_ [ event (static (onOffsetMain Offset)) ] [ "some view" ]
onOffsetMainWith :: (ScrollCoordinatorOffsetEvent -> model -> DOMRef -> action) -> EventHandler model action Source #
Like onOffsetMain, but the handler also receives read-only access to the
model and the target element's DOMRef (for imperative MTS mutation).
data Action = Offset ScrollCoordinatorOffsetEvent Model DOMRef view_ [ event (static (onOffsetMainWith Offset)) ] [ "some view" ]
Types
data ScrollCoordinatorOffsetEvent Source #
Payload of the bindoffset event.
Constructors
| ScrollCoordinatorOffsetEvent | |
Instances
| Show ScrollCoordinatorOffsetEvent Source # | |
Defined in Miso.Native.X.Element.ScrollCoordinator.Event Methods showsPrec :: Int -> ScrollCoordinatorOffsetEvent -> ShowS # show :: ScrollCoordinatorOffsetEvent -> String # showList :: [ScrollCoordinatorOffsetEvent] -> ShowS # | |
| Eq ScrollCoordinatorOffsetEvent Source # | |
Defined in Miso.Native.X.Element.ScrollCoordinator.Event Methods (==) :: ScrollCoordinatorOffsetEvent -> ScrollCoordinatorOffsetEvent -> Bool # (/=) :: ScrollCoordinatorOffsetEvent -> ScrollCoordinatorOffsetEvent -> Bool # | |