| Copyright | (C) 2016-2025 David M. Johnson (@dmjio) |
|---|---|
| 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.Runtime.Internal
Description
This is an internal module not meant for consumption during application
development. This is primarily meant to give user's access to the
global component state for testing. Use at your own risk. You have been warned.
We currently consume this module for the miso integration testing package miso-tests.
Alterations to these global variables *will* break your application. Again, do not use these in your main application, only use with the miso testing framework to test your application.
Synopsis
- components :: IORef (IntMap (ComponentState model action))
- componentIds :: IORef Int
- rootComponentId :: ComponentId
- data ComponentState model action = ComponentState {
- componentId :: ComponentId
- componentParentId :: ComponentId
- componentSubThreads :: IORef (Map MisoString ThreadId)
- componentDOMRef :: DOMRef
- componentVTree :: IORef VTree
- componentSink :: action -> JSM ()
- componentModel :: TVar model
- componentIsDirty :: TVar Bool
- componentActions :: IORef (Seq action)
- componentMailbox :: Mailbox
- componentScripts :: [DOMRef]
- componentMailboxThreadId :: ThreadId
- componentDiffs :: Mailbox
- componentNotify :: IO ()
- componentParentToChildThreadId :: Maybe ThreadId
- componentChildToParentThreadId :: Maybe ThreadId
Documentation
components :: IORef (IntMap (ComponentState model action)) Source #
componentIds :: IORef Int Source #
The global store of ComponentId, for internal-use only.
Used internally freshComponentId to allocate new ComponentId on
mount.
rootComponentId :: ComponentId Source #
This is used to demarcate the ROOT of a page. This ID will *never*
exist in the components map.
data ComponentState model action Source #
Constructors
| ComponentState | |
Fields
| |