MCPcopy
hub / github.com/ampproject/worker-dom / observe

Method observe

src/worker-thread/MutationObserver.ts:81–87  ·  view source on GitHub ↗

* Register the MutationObserver instance to observe a Nodes mutations. * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver * @param target Node to observe DOM mutations

(target: Node, options?: MutationObserverInit)

Source from the content-addressed store, hash-verified

79 * @param target Node to observe DOM mutations
80 */
81 public observe(target: Node, options?: MutationObserverInit): void {
82 this.disconnect();
83 this.target = target;
84 this.options = options || {};
85
86 observers.push(this);
87 }
88
89 /**
90 * Stop the MutationObserver instance from observing a Nodes mutations.

Calls 1

disconnectMethod · 0.95

Tested by

no test coverage detected