pub struct MutationObserverOptions {
pub child_list: bool,
pub attributes: bool,
pub character_data: bool,
pub subtree: bool,
pub attribute_old_value: bool,
pub character_data_old_value: bool,
pub attribute_filter: Option<Vec<String>>,
}Expand description
MutationObserver.observe() で指定される監視オプション
Fields§
§child_list: bool§attributes: bool§character_data: bool§subtree: bool§attribute_old_value: bool§character_data_old_value: bool§attribute_filter: Option<Vec<String>>Implementations§
Source§impl MutationObserverOptions
impl MutationObserverOptions
pub fn new() -> Self
Sourcepub fn normalize(
self,
attributes_specified: bool,
character_data_specified: bool,
) -> Result<Self, &'static str>
pub fn normalize( self, attributes_specified: bool, character_data_specified: bool, ) -> Result<Self, &'static str>
W3C 仕様準拠のオプション正規化・バリデーション:
- attributes が未指定でも attributeOldValue / attributeFilter があれば attributes = true
- characterData が未指定でも characterDataOldValue があれば characterData = true
- childList, attributes, characterData のいずれも true でなければエラー
- 矛盾したオプション組み合わせの検査
Sourcepub fn matches_attribute(&self, attr_name: &str) -> bool
pub fn matches_attribute(&self, attr_name: &str) -> bool
属性名が監視条件に合致するか判定
Trait Implementations§
Source§impl Clone for MutationObserverOptions
impl Clone for MutationObserverOptions
Source§fn clone(&self) -> MutationObserverOptions
fn clone(&self) -> MutationObserverOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MutationObserverOptions
impl Debug for MutationObserverOptions
Source§impl Default for MutationObserverOptions
impl Default for MutationObserverOptions
Source§fn default() -> MutationObserverOptions
fn default() -> MutationObserverOptions
Returns the “default value” for a type. Read more
impl Eq for MutationObserverOptions
Source§impl PartialEq for MutationObserverOptions
impl PartialEq for MutationObserverOptions
impl StructuralPartialEq for MutationObserverOptions
Auto Trait Implementations§
impl Freeze for MutationObserverOptions
impl RefUnwindSafe for MutationObserverOptions
impl Send for MutationObserverOptions
impl Sync for MutationObserverOptions
impl Unpin for MutationObserverOptions
impl UnsafeUnpin for MutationObserverOptions
impl UnwindSafe for MutationObserverOptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.