Crate leptos_dom

source ·
Expand description

The DOM implementation for leptos.

Re-exports

pub extern crate tracing;
pub use js_sys;
pub use wasm_bindgen;
pub use web_sys;
pub use html::*;

Modules

Collection of typed events.

Macros

Uses println!()-style formatting to log warnings to the console (in the browser) or via eprintln!() (if not in the browser), but only if it’s a debug build.
Uses println!()-style formatting to log errors to the console (in the browser) or via eprintln!() (if not in the browser).
Uses println!()-style formatting to log something to the console (in the browser) or via println!() (if not in the browser).
Uses println!()-style formatting to log warnings to the console (in the browser) or via eprintln!() (if not in the browser).

Structs

A user-defined leptos component.
Custom leptos component.
Represents any View that can change over time.
The internal representation of the DynChild core-component.
A component for efficiently rendering an iterable.
The internal representation of the Each core-component.
HTML element.
A struct to hold all the possible errors that could be provided by child Views
Represents a group of views.
Control and utility methods for hydration.
A stable identifer within the server-rendering or hydration process.
Handle that is generated by set_interval and can be used to clear the interval.
Contains a shared reference to a DOM node creating while using the view macro to create your UI.
HTML text
Wrapper for arbitrary data that can be passed through the view.
The unit () leptos counterpart.
The internal representation of the Unit core-component.

Enums

Represents the different possible values an attribute node could have.
Represents the different possible values a single class on an element could have, allowing you to do fine-grained updates to single items in Element.classList.
The core foundational leptos components.
Represents the different possible values an element property could have, allowing you to do fine-grained updates to single fields.
A leptos view which can be mounted to the DOM.

Traits

Converts some type into an Attribute.
Converts some type into a Class.
Trait for converting any iterable into a Fragment.
Converts some type into a Property.
Converts the value into a View.

Functions

Log an error to the console (in the browser) or via println!() (if not in the browser), but only in a debug build.
Log an error to the console (in the browser) or via println!() (if not in the browser).
Log a string to the console (in the browser) or via println!() (if not in the browser).
Log a warning to the console (in the browser) or via println!() (if not in the browser).
Returns the Document.
Helper function to extract Event.target from any event.
Helper function to extract event.target.checked from an event.
Helper function to extract event.target.value from an event.
Gets the value of a property set on a DOM element.
Returns true if running on the browser (CSR).
Returns true if debug_assertions are enabled.
Returns true if debug_assertions are disabled.
Returns true if running on the server (SSR).
Returns the current window.location.
Current window.location.hash without the beginning #.
Runs the provided closure and mounts the result to the provided element.
Runs the provided closure and mounts the result to eht <body>.
Renders a function to a stream of HTML strings.
Renders a function to a stream of HTML strings. After the view runs, the prefix will run with the same scope. This can be used to generate additional HTML that has access to the same Scope.
Renders a function to a stream of HTML strings and returns the Scope and RuntimeId that were created, so they can be disposed when appropriate. After the view runs, the prefix will run with the same scope. This can be used to generate additional HTML that has access to the same Scope.
Renders a function to a stream of HTML strings and returns the Scope and RuntimeId that were created, so they can be disposed when appropriate. After the view runs, the prefix will run with the same scope. This can be used to generate additional HTML that has access to the same Scope.
Renders the given function to a static HTML string.
Runs the given function between the next repaint using Window.requestAnimationFrame.
Queues the given function during an idle period
using Window.requestIdleCallback.
Repeatedly calls the given function, with a delay of the given duration between calls. See setInterval().
Sets a property on a DOM element.
Executes the given function after the given duration of time has passed. setTimeout().
Returns the Window.
Adds an event listener to the Window.