Module sauron_core::dom
source · Expand description
This module provides functionalities for manipulating the actual Document Object Model in the browser
Re-exports§
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;
pub use dispatch::Dispatch;
Modules§
- provides functionalities for commands to be executed by the system, such as when the application starts or after the application updates.
- Create events Object
- utility functions
Structs§
- request animation frame handle
- Cmd is a way to tell the Runtime that something needs to be executed
- Provides function for document related functions
- a dom version of the Attribute, thereby removing the MSG generic
- A counter part of the vdom Node This is needed, so that we can
- 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 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.
- a struct where the listeners, plain values, styles and function call values are grouped separately
- Provides functions for doing http network request
- Contains the time it took for the last app update call for the component TODO: Maybe rename to Diagnostics
- specify how the root node will be mounted to the mount node
- Program handle the lifecycle of the APP
- if the expression evaluates to true, diffing at this node will be skipped entirely
- combination of TreePath and SkipDiff
- Wrapper for stateful component
- Contains necessary information for creating template of the Component of this type_id
- Provides function related to Time
- handle for request_idle_callback calls
- Provides function for window related functions
Enums§
- a dom version of the Attribute value, thereby removing the MSG generic
- Map the Event to DomEvent, which are browser events
- Idle deadline interface which could be the real idle deadline if supported, otherwise the polyfill
- specify how the App is mounted to the DOM
- specify whether to attach the Node in shadow_root
- patch variant
Traits§
- An Application is the root component of your program. Everything that happens in your application is done here.
- A component has a view and can update itself.
- A component that can be used directly in the view without mapping
Functions§
- create a stateless component node
- wrapper of async delay but return no result, assume success
- utility function which a closure in request animation frame
- request idle callback
- request and idle callback
- skip diffing the node is the val is true
- Runs a Rust
Future
on the current thread. - create a stateful component node