(win)
| 7 | * @param {!Window} win |
| 8 | */ |
| 9 | export function installPullToRefreshBlocker(win) { |
| 10 | // Only do when requested and don't even try it on Safari! |
| 11 | // This mode is only executed in the single-doc mode. |
| 12 | const {documentElement} = win.document; |
| 13 | if ( |
| 14 | Services.viewerForDoc(documentElement).getParam('p2r') == '0' && |
| 15 | Services.platformFor(win).isChrome() |
| 16 | ) { |
| 17 | new PullToRefreshBlocker( |
| 18 | win.document, |
| 19 | Services.viewportForDoc(documentElement) |
| 20 | ); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Visible for testing only. |