Struct leptos_use::UseMutationObserverOptions
source · pub struct UseMutationObserverOptions { /* private fields */ }
Expand description
Options for use_mutation_observer_with_options
.
Implementations§
source§impl UseMutationObserverOptions
impl UseMutationObserverOptions
sourcepub fn subtree(self, value: bool) -> Self
pub fn subtree(self, value: bool) -> Self
Set to true
to extend monitoring to the entire subtree of nodes rooted at target
.
All of the other properties are then extended to all of the nodes in the subtree
instead of applying solely to the target
node. The default value is false
.
sourcepub fn child_list(self, value: bool) -> Self
pub fn child_list(self, value: bool) -> Self
Set to true
to monitor the target node (and, if subtree
is true
, its descendants)
for the addition of new child nodes or removal of existing child nodes.
The default value is false
.
sourcepub fn attributes(self, value: bool) -> Self
pub fn attributes(self, value: bool) -> Self
Set to true
to watch for changes to the value of attributes on the node or nodes being
monitored. The default value is true
if either of attribute_filter
or
attribute_old_value
is specified, otherwise the default value is false
.
sourcepub fn attribute_filter<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>
) -> Self
pub fn attribute_filter<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>> ) -> Self
An array of specific attribute names to be monitored. If this property isn’t included, changes to all attributes cause mutation notifications.
sourcepub fn attribute_old_value(self, value: bool) -> Self
pub fn attribute_old_value(self, value: bool) -> Self
Set to true
to record the previous value of any attribute that changes when monitoring
the node or nodes for attribute changes; See
Monitoring attribute values
for an example of watching for attribute changes and recording values.
The default value is false
.
sourcepub fn character_data<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>
) -> Self
pub fn character_data<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>> ) -> Self
Set to true
to monitor the specified target node
(and, if subtree
is true
, its descendants)
for changes to the character data contained within the node or nodes.
The default value is true
if character_data_old_value
is specified,
otherwise the default value is false
.
sourcepub fn character_data_old_value(self, value: bool) -> Self
pub fn character_data_old_value(self, value: bool) -> Self
Set to true
to record the previous value of a node’s text whenever the text changes on
nodes being monitored. The default value is false
.
Trait Implementations§
source§impl Clone for UseMutationObserverOptions
impl Clone for UseMutationObserverOptions
source§fn clone(&self) -> UseMutationObserverOptions
fn clone(&self) -> UseMutationObserverOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for UseMutationObserverOptions
impl Default for UseMutationObserverOptions
source§fn default() -> UseMutationObserverOptions
fn default() -> UseMutationObserverOptions
source§impl From<UseMutationObserverOptions> for MutationObserverInit
impl From<UseMutationObserverOptions> for MutationObserverInit
source§fn from(val: UseMutationObserverOptions) -> Self
fn from(val: UseMutationObserverOptions) -> Self
Auto Trait Implementations§
impl Freeze for UseMutationObserverOptions
impl RefUnwindSafe for UseMutationObserverOptions
impl Send for UseMutationObserverOptions
impl Sync for UseMutationObserverOptions
impl Unpin for UseMutationObserverOptions
impl UnwindSafe for UseMutationObserverOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more