MCPcopy
hub / github.com/hotwired/stimulus / pause

Method pause

src/mutation-observers/element_observer.ts:36–48  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

34 }
35
36 pause(callback: () => void) {
37 if (this.started) {
38 this.mutationObserver.disconnect()
39 this.started = false
40 }
41
42 callback()
43
44 if (!this.started) {
45 this.mutationObserver.observe(this.element, this.mutationObserverInit)
46 this.started = true
47 }
48 }
49
50 stop() {
51 if (this.started) {

Callers 5

connectOutletMethod · 0.45
disconnectOutletMethod · 0.45
connectTargetMethod · 0.45
disconnectTargetMethod · 0.45

Calls 1

disconnectMethod · 0.45

Tested by

no test coverage detected