(global)
| 334 | * @return {!Promise} |
| 335 | */ |
| 336 | export function adopt(global) { |
| 337 | return adoptShared(global, (global) => { |
| 338 | // Shared runtimes variables between both multi-doc and single-doc pages |
| 339 | adoptServicesAndResources(global); |
| 340 | |
| 341 | return waitForBodyOpenPromise(global.document).then(() => { |
| 342 | // Ensure that all declared extensions are marked and stubbed. |
| 343 | stubElementsForDoc(global.AMP.ampdoc); |
| 344 | }); |
| 345 | }); |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Applies the runtime to a given global scope for a single-doc mode. |
no test coverage detected