MCPcopy Index your code
hub / github.com/ampproject/amphtml / isObserved

Method isObserved

testing/intersection-observer-stub.js:41–48  ·  view source on GitHub ↗

* @param {!Element} target * @param {{ * root: (!Document|!Element|undefined), * rootMargin: (string|undefined), * thresholds: (number|!Array |undefined), * }=} options * @return {boolean}

(target, options = {})

Source from the content-addressed store, hash-verified

39 * @return {boolean}
40 */
41 isObserved(target, options = {}) {
42 return Array.from(this.observers).some((observer) => {
43 if (!observer.elements.has(target)) {
44 return false;
45 }
46 return matchesObserver(observer, options);
47 });
48 }
49
50 /**
51 * @param {!IntersectionObserverEntry|!Array<IntersectionObserverEntry>} entryOrEntries

Callers

nothing calls this directly

Calls 2

matchesObserverFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected