(element)
| 497 | * @return {boolean} |
| 498 | */ |
| 499 | export function looksLikeTrackingIframe(element) { |
| 500 | const {height, width} = element.getLayoutSize(); |
| 501 | // This heuristic is subject to change. |
| 502 | if (width > 10 || height > 10) { |
| 503 | return false; |
| 504 | } |
| 505 | // Iframe is not tracking iframe if open with user interaction |
| 506 | return !closestAncestorElementBySelector(element, '.i-amphtml-overlay'); |
| 507 | } |
| 508 | |
| 509 | // Most common ad sizes |
| 510 | // Array of [width, height] pairs. |
no test coverage detected