* Throws an error if window navigation is disallowed by this element. * Otherwise, does nothing. * @throws {!Error}
()
| 606 | * @throws {!Error} |
| 607 | */ |
| 608 | throwIfCannotNavigate() { |
| 609 | if (!this.sandboxContainsToken_(this.sandbox_, 'allow-top-navigation')) { |
| 610 | throw user().createError( |
| 611 | '"AMP.navigateTo" is only allowed on ' + |
| 612 | '<amp-iframe> when its "sandbox" attribute contains ' + |
| 613 | '"allow-top-navigation".' |
| 614 | ); |
| 615 | } |
| 616 | } |
| 617 | |
| 618 | /** |
| 619 | * Updates the element's dimensions to accommodate the iframe's |
no test coverage detected