extensions/amp-analytics/0.1/visibility-manager.js
/**
   * Listens to the visibility events for the specified element and the given
   * visibility spec. The visibility tracking can be deferred until
   * `readyPromise` is resolved, if specified.
   * @param {!Element} element
   * @param {!Object<string, *>} spec
   * @param {?Promise} readyPromise
   * @param {?function():!Promise} createReportPromiseFunc
   * @param {function(!Object<string, *>)} callback
   * @return {!UnlistenDef}
   */
Listens to the visibility events for the specified element and the given
visibility spec. The visibility tracking can be deferred until
`readyPromise` is resolved, if specified.
Listens to the visibility events for the specified element and the given visibility spec . The visibility tracking can be deferred until ` readyPromise ` is resolved if specified .
listenElement(
      element, spec, readyPromise, createReportPromiseFunc, callback) {
    const model = new VisibilityModel(
        spec,
        this.getElementVisibility.bind(this, element));
    return this.listen_(
        model, spec, readyPromise, createReportPromiseFunc, callback, element);
  }
listenElement ( element , spec , readyPromise , createReportPromiseFunc , callback ) { const model = new VisibilityModel ( spec , this . getElementVisibility . bind ( this , element ) ) ; return this . listen_ ( model , spec , readyPromise , createReportPromiseFunc , callback , element ) ; }
Listens to the visibility events for the specified element and the given
 visibility spec.
Listens to the visibility events for the specified element and the given visibility spec .