MCPcopy Create free account
hub / github.com/ampproject/amphtml / toggleObserveIntersection

Function toggleObserveIntersection

examples/ac-creative.js:50–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48var stopIntFunc;
49
50function toggleObserveIntersection() {
51 if (shouldStopInt) {
52 stopIntFunc();
53 } else {
54 stopIntFunc = window.context.observeIntersection(intersectionCallback);
55 }
56 shouldStopInt = !shouldStopInt;
57}
58
59function toggleObserveVisibility() {
60 if (shouldStopVis) {

Callers

nothing calls this directly

Calls 1

observeIntersectionMethod · 0.80

Tested by

no test coverage detected