(win)
| 562 | * @return {boolean} |
| 563 | */ |
| 564 | export function canInspectWindow(win) { |
| 565 | // TODO: this is not reliable. The compiler assumes that property reads are |
| 566 | // side-effect free. The recommended fix is to use goog.reflect.sinkValue |
| 567 | // but since we're not using the closure library I'm not sure how to do this. |
| 568 | // See https://github.com/google/closure-compiler/issues/3156 |
| 569 | try { |
| 570 | // win['test'] could be truthy but not true the compiler shouldn't be able |
| 571 | // to optimize this check away. |
| 572 | return !!win.location.href && (win['test'] || true); |
| 573 | } catch (unusedErr) { |
| 574 | return false; |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | /** @const {string} */ |
| 579 | export const FIE_EMBED_PROP = '__AMP_EMBED__'; |
no outgoing calls
no test coverage detected