Struct stdweb::web::MutationObserverHandle [] [src]

pub struct MutationObserverHandle { /* fields omitted */ }

A wrapper which ensures that memory is properly cleaned up when it's no longer needed.

This is created by the MutationObserver::new method, and it can use the same methods as MutationObserver.

When the MutationObserverHandle is dropped, the disconnect method will automatically be called.

Methods from Deref<Target = MutationObserver>

[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 Debug for MutationObserverHandle
[src]

[src]

Formats the value using the given formatter. Read more

impl Deref for MutationObserverHandle
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl Drop for MutationObserverHandle
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations