* Returns the document in the single-doc mode. In a multi-doc mode, an * error will be thrown. * @return {!AmpDoc}
()
| 98 | * @return {!AmpDoc} |
| 99 | */ |
| 100 | getSingleDoc() { |
| 101 | // TODO(#22733): once docroot migration is done, this should be renamed |
| 102 | // to `getTopDoc()` method. |
| 103 | return devAssert(this.singleDoc_); |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * If the node is an AMP custom element, retrieves the AmpDoc reference. |
no test coverage detected