This is a major refactor to how Text-coercing values work as both View expressions and attributes:
All 8-32 bit integers, floats, and bools are passed by their IntoWasmAbi value to JS, so they never need to be serialized in Rust, ryu is no longer necessary.
u64, u128, i64, and 128 are passed as 32 bit integers if the value is in range, otherwise they are serialized in Rust using itoa as previously. Should relax this a bit to allow integers fitting in Number.MIN_SAFE_INTEGER ..= Number.MAX_SAFE_INTEGER range eventually.
Element attribute expressions now use their own AttributeView trait that allows them to be attached to hoisted (having their own JS function and their own web_sys::Node handle in Rust) elements.
Provided attributes are now defined as 0-sized structs. All attributes can implement any number of Property<&str | f64 | bool> to enforce a type-safe interface for setting their values. Additionally some provided attributes might enforce their types more strictly (like checked on <input> requires a bool).
This is a major refactor to how Text-coercing values work as both
View
expressions and attributes:IntoWasmAbi
value to JS, so they never need to be serialized in Rust,ryu
is no longer necessary.u64
,u128
,i64
, and128
are passed as 32 bit integers if the value is in range, otherwise they are serialized inRust
usingitoa
as previously. Should relax this a bit to allow integers fitting inNumber.MIN_SAFE_INTEGER ..= Number.MAX_SAFE_INTEGER
range eventually.AttributeView
trait that allows them to be attached to hoisted (having their own JS function and their ownweb_sys::Node
handle in Rust) elements.Property<&str | f64 | bool>
to enforce a type-safe interface for setting their values. Additionally some provided attributes might enforce their types more strictly (likechecked
on<input>
requires abool
).