| Copyright | (C) 2016-2025 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.Lynx.FFI
Contents
Description
Synopsis
- setInterval :: Double -> JSM () -> JSM Double
- clearInterval :: Double -> JSM Double
- setTimeout :: Double -> JSM () -> JSM Double
- clearTimeout :: Double -> JSM ()
- invokeExec :: (ToJSVal params, FromJSVal argument) => MisoString -> MisoString -> params -> (argument -> action) -> (MisoString -> action) -> Effect parent model action
Lynx specific FFI
Arguments
| :: (ToJSVal params, FromJSVal argument) | |
| => MisoString | method |
| -> MisoString | selector |
| -> params | params |
| -> (argument -> action) | successful |
| -> (MisoString -> action) | errorful |
| -> Effect parent model action |
https://lynxjs.org/api/lynx-api/nodes-ref/nodes-ref-invoke.html
Used to call methods on elements in view_, image_, etc.
We use this internally to implement the various Method sections
per the lynx docs.
invokeExec "gifs" "startAnimate" :: JSM ()
lynx.createSelectorQuery()
.select('#gifs')
.invoke({
method: startAnimate,
}).exec();
invoke