You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: How would callback heavy code perform under GHCJS? For example, most Elm-like architectures require a callback to triggered on almost every user-interaction to update the model state (eg. keypress in an input, on-hover to add/remove classes, etc.)
If said callbacks are JS => Haskell callbacks, what kind of performance can one expect?
When should one call releaseCallback on such callbacks? Would they be automatically released if the underlying DOM node (on which click/keypress/hover callbacks are registered) is destroyed?
The text was updated successfully, but these errors were encountered:
My approach is to export one callback at application startup, capture events at the root of the document (ie. add a single event listener to document.body), and dispatch the event manually to the correct place inside the Haskell code. That way JS/DOM doesn't have to retain any references to Haskell values, and I don't have to export/release tons of callbacks while the application is running.
Context: How would callback heavy code perform under GHCJS? For example, most Elm-like architectures require a callback to triggered on almost every user-interaction to update the model state (eg. keypress in an input, on-hover to add/remove classes, etc.)
releaseCallback
on such callbacks? Would they be automatically released if the underlying DOM node (on which click/keypress/hover callbacks are registered) is destroyed?The text was updated successfully, but these errors were encountered: