* @param {!IntersectionObserverEntry|!Array } entryOrEntries * @param {{ * root: (!Document|!Element|undefined), * rootMargin: (string|undefined), * thresholds: (number|!Array |undefined), * }=} options
(entryOrEntries, options = {})
| 56 | * }=} options |
| 57 | */ |
| 58 | notifySync(entryOrEntries, options = {}) { |
| 59 | const entries = Array.isArray(entryOrEntries) |
| 60 | ? entryOrEntries |
| 61 | : [entryOrEntries]; |
| 62 | this.observers.forEach((observer) => { |
| 63 | if (!matchesObserver(observer, options)) { |
| 64 | return; |
| 65 | } |
| 66 | const subEntries = entries.filter(({target}) => |
| 67 | observer.elements.has(target) |
| 68 | ); |
| 69 | if (subEntries.length > 0) { |
| 70 | observer.callback(subEntries); |
| 71 | } |
| 72 | }); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | class IntersectionObserverStub { |
nothing calls this directly
no test coverage detected