* @param {!./ampdoc-impl.AmpDoc} ampdoc
(ampdoc)
| 36 | * @param {!./ampdoc-impl.AmpDoc} ampdoc |
| 37 | */ |
| 38 | constructor(ampdoc) { |
| 39 | /** @private @const */ |
| 40 | this.ampdoc_ = ampdoc; |
| 41 | |
| 42 | const {win} = ampdoc; |
| 43 | const inViewport = this.inViewport_.bind(this); |
| 44 | const ioCallback = (records) => |
| 45 | /** @type {!Array<!IntersectionObserverEntry>} */ (records).forEach( |
| 46 | inViewport |
| 47 | ); |
| 48 | /** @private @const {!IntersectionObserver} */ |
| 49 | this.io_ = createViewportObserver(ioCallback, win); |
| 50 | |
| 51 | /** @private @const {!WeakMap<!AmpElement, !LoadingIndicatorStateDef>} */ |
| 52 | this.states_ = new WeakMap(); |
| 53 | } |
| 54 | |
| 55 | /** @override */ |
| 56 | dispose() { |
nothing calls this directly
no test coverage detected