Module sauron_core::dom

source ·
Expand description

This module provides functionalities for manipulating the actual Document Object Model in the browser

Re-exports

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
  • A generic wrapper for a closure in rust where we can transform and pass around.
  • 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.
  • 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
  • These are collections of fields where we can modify the Cmd such as logging measurement or should update the view
  • Program handle the lifecycle of the APP
  • Task is used to do asynchronous operations
  • handle for request_idle_callback calls
  • A self contain web component This is needed to move some of the code from the #custom_element macro This is also necessary, since #[wasm_bindgen] macro can not process impl types which uses generics, we use generics here to simplify the code and do the type checks for us, rather than in the code derived from the #[web_component] macro

Enums

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 Container have children that is set from the parent component
  • a trait for implementing WebComponent in the DOM with custom tag
  • A widget is a very simple component that can update itself view, but it can have no effect on the external component that use it.

Functions