()
| 494 | */ |
| 495 | export function pollForLayout(win, count, opt_timeout) { |
| 496 | const getCount = () => { |
| 497 | return win.document.querySelectorAll('.i-amphtml-layout,.i-amphtml-error') |
| 498 | .length; |
| 499 | }; |
| 500 | return poll( |
| 501 | 'Waiting for elements to layout: ' + count, |
| 502 | () => { |