* @param {!IntersectionObserverStub} observer * @param {{ * root: (!Document|!Element|undefined), * rootMargin: (string|undefined), * thresholds: (number|!Array |undefined), * }} options
(observer, options)
| 115 | * }} options |
| 116 | */ |
| 117 | function 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 | } |
no test coverage detected