pub trait RealDom {
type Event;
type MouseEvent;
type EventCallback: Clone;
}Expand description
In some applications, VirtualNode get converted into real DOM nodes.
This trait contains types and methods for manipulating a real DOM.
When running a client-side web application, consider using web_sys::Window as the
RealDom.
When running on a server, consider using the null () type as the RealDom.
To control how a VirtualNode gets rendered to a DOM element, implement RealDom for your
own custom type.
Required Associated Types§
Sourcetype Event
type Event
The event type. In the web this is web_sys::Event.
Sourcetype MouseEvent
type MouseEvent
The event type for mouse events. In the web this is web_sys::MouseEvent.
Sourcetype EventCallback: Clone
type EventCallback: Clone
The type for callbacks such as |some_event| { ... }.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl RealDom for Window
Available on crate feature web only.
impl RealDom for Window
Available on crate feature
web only.