| 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.Svg.Event
Description
Synopsis
- onLoad :: action -> Attribute model action
- onLoadWith :: (DOMRef -> action) -> Attribute model action
- onLoadMain :: action -> EventHandler model action
- onLoadMainWith :: (model -> DOMRef -> action) -> EventHandler model action
- svgEvents :: Events
Events
onLoad :: action -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/svg.html#bindload
Triggered when the SVG finishes loading.
onLoadWith :: (DOMRef -> action) -> Attribute model action Source #
onLoadMain :: action -> EventHandler model action Source #
Like onLoad, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Loaded view_ [ event (static (onLoadMain Loaded)) ] [ "some view" ]
onLoadMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #
Like onLoadMain, but the handler also receives read-only access to the
model and the target element's DOMRef (for imperative MTS mutation).
data Action = Loaded Model DOMRef view_ [ event (static (onLoadMainWith Loaded)) ] [ "some view" ]