* @param {!Window} win
(win)
| 27 | * @param {!Window} win |
| 28 | */ |
| 29 | constructor(win) { |
| 30 | /** @const {!Window} */ |
| 31 | this.win = win; |
| 32 | |
| 33 | const ampdocService = Services.ampdocServiceFor(win); |
| 34 | |
| 35 | // The isSingleDoc check is required because if in shadow mode, this will |
| 36 | // throw a console error because the shellShadowDoc_ is not set when |
| 37 | // fetching the amp doc. So either the test-bind-impl or test pre setup in |
| 38 | // shadow mode tests needs to be fixed or there is a bug in ampdoc impl |
| 39 | // getAmpDoc. |
| 40 | // TODO(alabiaga): This should be investigated and fixed |
| 41 | /** @private {?./ampdoc-impl.AmpDoc} */ |
| 42 | this.ampdocSingle_ = ampdocService.isSingleDoc() |
| 43 | ? ampdocService.getSingleDoc() |
| 44 | : null; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * We want to call `fetch_` unbound from any context since it could |
nothing calls this directly
no test coverage detected