Struct stdweb::web::MutationObserver [] [src]

pub struct MutationObserver(_);

Provides a way to receive notifications about changes to the DOM.

(JavaScript docs)

Methods

impl MutationObserver
[src]

[src]

Returns a new MutationObserverHandle with the given callback.

The callback will be called with the following arguments when the observed DOM nodes change:

  1. A vector of changes to the observed DOM nodes.

  2. The MutationObserver.

(JavaScript docs)

[src]

Starts observing changes to the target.

When the target is changed, the MutationObserver is notified with a vector of MutationRecord.

The options specifies which changes should be observed.

Multiple different targets can be observed simultaneously (with the same or different options).

If you call observe on the same target multiple times, it will replace the old options with the new options. It will not notify multiple times for the same change to the same target.

Panics

(JavaScript docs)

[src]

Stops observing all targets.

Until the observe method is called again, the MutationObserver will not be notified of any changes.

(JavaScript docs)

[src]

Empties the MutationObserver's record queue and returns what was in there.

This method is generally not needed, instead use the MutationObserver callback to respond to changes.

(JavaScript docs)

Trait Implementations

impl Clone for MutationObserver
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for MutationObserver
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for MutationObserver
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for MutationObserver
[src]

impl InstanceOf for MutationObserver
[src]

[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for MutationObserver
[src]

[src]

Performs the conversion.

impl ReferenceType for MutationObserver
[src]

[src]

Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more

impl From<MutationObserver> for Reference
[src]

[src]

Performs the conversion.

impl TryFrom<MutationObserver> for Reference
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Reference> for MutationObserver
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Reference> for MutationObserver
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Value> for MutationObserver
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Value> for MutationObserver
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl JsSerialize for MutationObserver
[src]

Auto Trait Implementations