[][src]Enum stdweb::web::MutationRecord

pub enum MutationRecord {
    Attribute {
        target: Node,
        name: String,
        namespace: Option<String>,
        old_value: Option<String>,
    },
    CharacterData {
        target: Node,
        old_data: Option<String>,
    },
    ChildList {
        target: Node,
        inserted_nodes: NodeList,
        removed_nodes: NodeList,
        previous_sibling: Option<Node>,
        next_sibling: Option<Node>,
    },
}

Contains information about an individual change to the DOM.

It is passed to the MutationObserver's callback.

(JavaScript docs)

Variants

Attribute

One of the target's attributes was changed.

Fields of Attribute

target: Node

The Node whose attribute changed.

name: String

The name of the changed attribute.

namespace: Option<String>

The namespace of the changed attribute.

old_value: Option<String>

The value of the changed attribute before the change.

CharacterData

The target's data was changed.

Fields of CharacterData

target: Node

The CharacterData node whose data changed.

old_data: Option<String>

The data of the target before the change.

ChildList

The children of the target were changed.

Fields of ChildList

target: Node

The Node whose children changed.

inserted_nodes: NodeList

The nodes which were inserted. Will be an empty NodeList if no nodes were inserted.

removed_nodes: NodeList

The nodes which were removed. Will be an empty NodeList if no nodes were removed.

previous_sibling: Option<Node>

The previous sibling of the inserted or removed nodes, or None.

next_sibling: Option<Node>

The next sibling of the inserted or removed nodes, or None.

Trait Implementations

impl TryFrom<Value> for MutationRecord[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl Clone for MutationRecord[src]

impl Debug for MutationRecord[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]