pub trait CustomElementUpdater<V: FromAnyValue + Send + Sync = ()>:
Send
+ Sync
+ 'static {
// Required methods
fn attributes_changed(
&mut self,
light_root: NodeMut<'_, V>,
attributes: &AttributeMask,
);
fn roots(&self) -> Vec<NodeId>;
// Provided method
fn slot(&self) -> Option<NodeId> { ... }
}
Expand description
A trait for updating custom elements
Required Methods§
Sourcefn attributes_changed(
&mut self,
light_root: NodeMut<'_, V>,
attributes: &AttributeMask,
)
fn attributes_changed( &mut self, light_root: NodeMut<'_, V>, attributes: &AttributeMask, )
Update the custom element’s shadow tree with the new attributes. Called when the attributes of the custom element are changed.