Expand description
Optimistic operations
In may cases, Web APIs in Rust return Result
or Option
and enforce strict types. Then
again in JavaScript-land one can simply call .focus()
on something and it works, breaks, or
does nothing. But the code looks a bit simpler.
Optimistic traits bring part of this to Rust. Functions on yew::prelude::NodeRef
just work,
or fail silently.
Traitsยง
- Optimistic
Element - Support working with
web_sys::Element
- Optimistic
Html Element - Support working with
web_sys::HtmlElement
- Optimistic
Html Form Element - Support working with
web_sys::HtmlFormElement
- Optimistic
Html Input Element - Support working with
web_sys::HtmlInputElement