* @param {!Document|!Window|!Doc} input * @return {!Doc}
(input)
| 10723 | * @return {!Doc} |
| 10724 | */ |
| 10725 | function resolveDoc(input) { |
| 10726 | // Is it a `Document` |
| 10727 | if (/** @type {!Document} */ (input).nodeType === /* DOCUMENT */ 9) { |
| 10728 | return new GlobalDoc(/** @type {!Document} */ (input)); |
| 10729 | } |
| 10730 | // Is it a `Window`? |
| 10731 | if (/** @type {!Window} */ (input).document) { |
| 10732 | return new GlobalDoc(/** @type {!Window} */ (input)); |
| 10733 | } |
| 10734 | return /** @type {!Doc} */ (input); |
| 10735 | } |
| 10736 | |
| 10737 | /** |
| 10738 | * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved. |
no outgoing calls
no test coverage detected