@private
()
| 168 | |
| 169 | /** @private */ |
| 170 | assertPosition_() { |
| 171 | const pos = this.element.getLayoutBox(); |
| 172 | const minTop = Math.min(600, this.getViewport().getSize().height * 0.75); |
| 173 | userAssert( |
| 174 | pos.top >= minTop, |
| 175 | '<amp-iframe> elements must be positioned outside the first 75% ' + |
| 176 | 'of the viewport or 600px from the top (whichever is smaller): %s ' + |
| 177 | ' Current position %s. Min: %s' + |
| 178 | "Positioning rules don't apply for iframes that use `placeholder`." + |
| 179 | 'See https://github.com/ampproject/amphtml/blob/main/extensions/' + |
| 180 | 'amp-iframe/amp-iframe.md#iframe-with-placeholder for details.', |
| 181 | this.element, |
| 182 | pos.top, |
| 183 | minTop |
| 184 | ); |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * @param {string} sandbox |
no test coverage detected