| 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 parent model action))
- componentIds :: IORef Int
- rootComponentId :: ComponentId
- data ComponentState parent model action = ComponentState {
- _componentId :: ComponentId
- _componentParentId :: ComponentId
- _componentSubThreads :: IORef (Map MisoString ThreadId)
- _componentDOMRef :: DOMRef
- _componentVTree :: IORef VTree
- _componentSink :: action -> IO ()
- _componentModel :: model
- _componentIsDirty :: Bool
- _componentScripts :: [DOMRef]
- _componentEvents :: Events
- _componentBindings :: [Binding parent model]
- _componentMailbox :: Value -> Maybe action
- _componentDraw :: model -> IO ()
- _componentModelDirty :: model -> model -> Bool
- _componentApplyActions :: [action] -> model -> IntMap (ComponentState parent model action) -> (IntMap (ComponentState parent model action), model, [Schedule action])
- _componentTopics :: Map MisoString (Value -> IO ())
- _componentChildren :: ComponentIds
Documentation
components :: IORef (IntMap (ComponentState parent 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 parent model action Source #
Constructors
| ComponentState | |
Fields
| |