pub trait GlobalAttributes: SetAttribute + Sized {
// Provided methods
fn attr(self, name: &'static str, value: impl Into<StringAttribute>) -> Self { ... }
fn bool_attr(
self,
name: &'static str,
value: impl Into<MaybeDyn<bool>>,
) -> Self { ... }
fn prop(
self,
name: &'static str,
value: impl Into<MaybeDyn<JsValue>>,
) -> Self { ... }
fn on<E: EventDescriptor, R>(
self,
_: E,
handler: impl EventHandler<E, R>,
) -> Self { ... }
fn bind<E: BindDescriptor>(self, _: E, signal: Signal<E::ValueTy>) -> Self { ... }
}
Expand description
Attributes that are available on all elements.
Provided Methods§
Sourcefn attr(self, name: &'static str, value: impl Into<StringAttribute>) -> Self
fn attr(self, name: &'static str, value: impl Into<StringAttribute>) -> Self
Set attribute name
with value
.
Sourcefn bool_attr(self, name: &'static str, value: impl Into<MaybeDyn<bool>>) -> Self
fn bool_attr(self, name: &'static str, value: impl Into<MaybeDyn<bool>>) -> Self
Set attribute name
with value
.
Sourcefn prop(self, name: &'static str, value: impl Into<MaybeDyn<JsValue>>) -> Self
fn prop(self, name: &'static str, value: impl Into<MaybeDyn<JsValue>>) -> Self
Set JS property name
with value
.
Sourcefn on<E: EventDescriptor, R>(
self,
_: E,
handler: impl EventHandler<E, R>,
) -> Self
fn on<E: EventDescriptor, R>( self, _: E, handler: impl EventHandler<E, R>, ) -> Self
Set an event handler with name
.
Sourcefn bind<E: BindDescriptor>(self, _: E, signal: Signal<E::ValueTy>) -> Self
fn bind<E: BindDescriptor>(self, _: E, signal: Signal<E::ValueTy>) -> Self
Set a two way binding with name
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.