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§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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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