MutationObserver

MutationObserver

Overview

MutationObserver is a class in Aspose.Html FOSS for Python.

Observe DOM mutations on a target node.

This class provides 4 methods for working with MutationObserver objects in Python programs. Available methods include: __init__, disconnect, observe, take_records. All public members are accessible to any Python application after installing the Aspose.Html FOSS for Python package.

Methods

SignatureDescription
__init__(callback: Callable[[list[MutationRecord], "MutationObserver"], None])Create an observer with a mutation callback.
observe(target: "Node", child_list: bool, attributes: bool, character_data: bool, subtree: bool, attribute_filter: list[str] | None, attribute_old_value: bool, character_data_old_value: bool)Start observing target with the given options.
disconnect()Stop all active observations and clear queued records.
take_records()list[MutationRecord]Return queued records and clear the internal queue.

See Also