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

Miso.Lynx.FFI

Description

 
Synopsis

Lynx specific FFI

invokeExec Source #

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