Expand description
This module provides functionalities for manipulating the actual Document Object Model in the browser
Re-exports§
pub use dispatch::Dispatch;
pub use util::document;
pub use util::history;
pub use util::now;
pub use util::performance;
pub use util::window;
pub use util::inject_style;
Modules§
- dispatch
- provides functionalities for commands to be executed by the system, such as when the application starts or after the application updates.
- events
- Create events Object
- skip_
diff - util
- utility functions
Structs§
- Animation
Frame Handle - request animation frame handle
- Cmd
- Cmd is a way to tell the Runtime that something needs to be executed
- Document
- Provides function for document related functions
- DomAttr
- a dom version of the Attribute, thereby removing the MSG generic
- DomNode
- A counter part of the vdom Node This is needed, so that we can
- DomPatch
- a Patch where the virtual nodes are all created in the document. This is necessary since the created Node doesn’t contain references as opposed to Patch which contains reference to the vdom, which makes it hard to be included in a struct
- Effects
- Effects is a convenient way to group Msg for component to execute subsequent updates based on certain conditions. This can be used for doing animation and incremental changes to the view to provide an effect of transition or animation.
- Grouped
DomAttr Values - a struct where the listeners, plain values, styles and function call values are grouped separately
- Http
- Provides functions for doing http network request
- Measurements
- Contains the time it took for the last app update call for the component TODO: Maybe rename to Diagnostics
- Mount
Procedure - specify how the root node will be mounted to the mount node
- Program
- Program handle the lifecycle of the APP
- Skip
Diff - if the expression evaluates to true, diffing at this node will be skipped entirely
- Skip
Path - combination of TreePath and SkipDiff
- Stateful
Model - Wrapper for stateful component
- Stateless
Model - Contains necessary information for creating template of the Component of this type_id
- Time
- Provides function related to Time
- Timeout
Callback Handle - handle for request_idle_callback calls
- Window
- Provides function for window related functions
Enums§
- DomAttr
Value - a dom version of the Attribute value, thereby removing the MSG generic
- Event
- Map the Event to DomEvent, which are browser events
- Idle
Callback Handle - Idle
Deadline - Idle deadline interface which could be the real idle deadline if supported, otherwise the polyfill
- Mount
Action - specify how the App is mounted to the DOM
- Mount
Target - specify whether to attach the Node in shadow_root
- Patch
Variant - patch variant
Traits§
- Application
- An Application is the root component of your program. Everything that happens in your application is done here.
- Component
- A component has a view and can update itself.
- Stateful
Component - A component that can be used directly in the view without mapping
Functions§
- apply_
dom_ patches - TODO: this should not have access to root_node, so it can generically apply patch to any dom node
- component
- create a stateless component node
- convert_
patches - get the real DOM target node and make a DomPatch object for each of the Patch
- create_
dom_ node - Create a dom node
- delay
- wrapper of async delay but return no result, assume success
- request_
animation_ frame - utility function which a closure in request animation frame
- request_
idle_ callback - request idle callback
- request_
timeout_ callback - request and idle callback
- skip_if
- skip diffing the node is the val is true
- spawn_
local - Runs a Rust
Future
on the current thread. - stateful_
component - create a stateful component node