(doc, fn, opt_makesBodyVisible)
| 51 | * task scheduling strategy. |
| 52 | */ |
| 53 | export function startupChunk(doc, fn, opt_makesBodyVisible) { |
| 54 | if (deactivated) { |
| 55 | resolved.then(fn); |
| 56 | return; |
| 57 | } |
| 58 | const service = chunkServiceForDoc(doc.documentElement || doc); |
| 59 | service.runForStartup(fn); |
| 60 | if (opt_makesBodyVisible) { |
| 61 | service.runForStartup(() => { |
| 62 | service.bodyIsVisible_ = true; |
| 63 | }); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Run the given function sometime in the future without blocking UI. |
no test coverage detected