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

Function matchesObserver

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

* @param {!IntersectionObserverStub} observer * @param {{ * root: (!Document|!Element|undefined), * rootMargin: (string|undefined), * thresholds: (number|!Array |undefined), * }} options

(observer, options)

Source from the content-addressed store, hash-verified

115 * }} options
116 */
117function matchesObserver(observer, options) {
118 const {root, rootMargin, thresholds} = options;
119 return (
120 (root === undefined || root == observer.root) &&
121 (rootMargin === undefined || rootMargin == observer.rootMargin) &&
122 (thresholds === undefined ||
123 areEqualOrdered(thresholds, observer.thresholds))
124 );
125}

Callers 2

isObservedMethod · 0.85
notifySyncMethod · 0.85

Calls 1

areEqualOrderedFunction · 0.90

Tested by

no test coverage detected