@DOMObjectAttribute @DOMNameAttribute(name="MutationObserver") public class MutationObserver extends DOMObject
A MutationObserver
object can be used to observe mutations to the tree of Node
.
PropertyChanged, PropertyChangedDelegate
Constructor and Description |
---|
MutationObserver(MutationCallback callback)
Constructs a MutationObserver object and sets its
MutationCallback to callback. |
Modifier and Type | Method and Description |
---|---|
void |
disconnect()
Stops observer from observing any mutations.
|
void |
enqueue(MutationRecord record) |
void |
invoke() |
void |
observe(Node target,
MutationObserverInit options)
Instructs the user agent to observe a given target (a node) and report any mutations based on the criteria given by options (an object).
|
static com.aspose.ms.System.IDisposable |
subscribe(Node target,
MutationCallback callback,
MutationObserverInit options) |
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MutationRecord> |
takeRecords()
The method returns a copy of the record queue and then empty the record queue.
|
fireNotifyPropertyChanged, getCurrentValues, getRuntimesBinding, setCurrentValues, setField, setRuntimesBinding
public MutationObserver(MutationCallback callback)
Constructs a MutationObserver object and sets its MutationCallback
to callback.
The callback is invoked with a list of MutationRecord objects as first argument and the constructed MutationObserver object as second argument. It is invoked after nodes registered with the Observe(Node, IMutationObserverInit)
method, are mutated.
callback
- The callback.public static com.aspose.ms.System.IDisposable subscribe(Node target, MutationCallback callback, MutationObserverInit options)
@DOMNameAttribute(name="observe") public void observe(Node target, MutationObserverInit options)
Instructs the user agent to observe a given target (a node) and report any mutations based on the criteria given by options (an object). The options argument allows for setting mutation observation options via object members.
target
- The target for observe.options
- The observer options.@DOMNameAttribute(name="disconnect") public void disconnect()
Stops observer from observing any mutations. Until the observe() method is used again, observer’s callback will not be invoked.
@DOMNameAttribute(name="takeRecords") public com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MutationRecord> takeRecords()
The method returns a copy of the record queue and then empty the record queue.
public void invoke()
public void enqueue(MutationRecord record)