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