* @param {!Window} win * @return {number}
(win)
| 395 | * @return {number} |
| 396 | */ |
| 397 | function iframeNestingDepth(win) { |
| 398 | let w = win; |
| 399 | let depth = 0; |
| 400 | while (w != w.parent && depth < 100) { |
| 401 | w = w.parent; |
| 402 | depth++; |
| 403 | } |
| 404 | devAssert(w == win.top); |
| 405 | return depth; |
| 406 | } |
| 407 | |
| 408 | /** |
| 409 | * @param {!Window} win |
no test coverage detected